1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

Merge pull request #28 from YunoHost-Apps/fix-path-traversal

[N.B. : App to be downgraded to level 4 if this ain't fixed soon...] Update nginx.conf to protect against path traversal issue
This commit is contained in:
Alexandre Aubin 2020-11-04 13:26:35 +01:00 committed by GitHub
commit 63d4aa90c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,8 @@
location __PATH__ {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/www/;
# Protecting sensibles urls
location ~ 403 {
@ -12,9 +16,6 @@ location __PATH__ {
rewrite ^(.*)$ /config\.(.*)\.php redirect;
}
# Path to source
alias __FINALPATH__/www/;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}