nginx: fix regexes

This commit is contained in:
quitte 2023-08-24 16:28:07 +02:00
parent ebb066c027
commit 7d2c00ef1f
2 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ in
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
'';
};
"~ ^/cmd/([^\\n|\\r]*)$".return = "301 https://pad.ifsr.de/$1";
"~ ^/cmd(/?[^\\n|\\r]*)$".return = "301 https://pad.ifsr.de$1";
# security
"~* /(\.git|cache|bin|logs|backup|tests)/.*$".return = "403";
# deny running scripts inside core system folders