Welcome! Log In Create A New Profile

Advanced

Server config analysis engine in Nginx Amplify fails to recognize regex pattern

Juliy V. Chirkov
May 28, 2022 09:28AM
Hi guys

Seems server config analysis engine in Nginx Amplify fails to recognize
common regex pattern

Server config analysis reports

——————
Regex location has no regex pattern

Regex location has a valid modifier, but does not have a regex pattern.
Performance-wise it is more efficient to configure exact or prefix matching
for locations that do not require regex matching. It is also less prone to
errors. Please refer to the documentation describing location directive to
learn more.

Check the following files:
/etc/nginx/conf.d/location.common.conf, line 11
-------------

While line 11 of that file indeed does contain regex pattern: location ~
"/\." {

I.e. any file or folder which name starts with dot. The goal is to protect
dot files like .env from public access. The complete rule follows

location ~ "/\." {
return 444;
}

--
Juliy V. Chirkov
https://juliyvchirkov.github.io
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Server config analysis engine in Nginx Amplify fails to recognize regex pattern

Juliy V. Chirkov 139 May 28, 2022 09:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready