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:
commit
63d4aa90c9
1 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,8 @@
|
||||||
location __PATH__ {
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
|
location __PATH__/ {
|
||||||
|
|
||||||
|
# Path to source
|
||||||
|
alias __FINALPATH__/www/;
|
||||||
|
|
||||||
# Protecting sensibles urls
|
# Protecting sensibles urls
|
||||||
location ~ 403 {
|
location ~ 403 {
|
||||||
|
@ -12,9 +16,6 @@ location __PATH__ {
|
||||||
rewrite ^(.*)$ /config\.(.*)\.php redirect;
|
rewrite ^(.*)$ /config\.(.*)\.php redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Path to source
|
|
||||||
alias __FINALPATH__/www/;
|
|
||||||
|
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue