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; 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 # security
"~* /(\.git|cache|bin|logs|backup|tests)/.*$".return = "403"; "~* /(\.git|cache|bin|logs|backup|tests)/.*$".return = "403";
# deny running scripts inside core system folders # deny running scripts inside core system folders

View file

@ -104,8 +104,8 @@ in
proxyPass = "http://127.0.0.1:${toString listenPort}"; proxyPass = "http://127.0.0.1:${toString listenPort}";
proxyWebsockets = true; proxyWebsockets = true;
}; };
locations."~ ^/ese/([^\\n|\\r]*)$".return = "301 https://wiki.ese.ifsr.de/$1"; locations."~ ^/ese(/?[^\\n|\\r]*)$".return = "301 https://wiki.ese.ifsr.de$1";
locations."~ ^/fsr/([^\\n|\\r]*)$".return = "301 https://wiki.ifsr.de/$1"; locations."~ ^/fsr(/?[^\\n|\\r]*)$".return = "301 https://wiki.ifsr.de$1";
}; };
}; };
}; };