From b7b857836e7e377c729a133814b09bbb31f3ce90 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Wed, 28 Aug 2019 08:30:33 +0200 Subject: [PATCH] fix nginx path traversal --- conf/nginx.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index f13dd41..329ccf7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,4 @@ +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; # https://github.com/WeblateOrg/weblate/blob/master/examples/weblate.nginx.conf location ^__PATH__/favicon.ico$ { # DATA_DIR/static/favicon.ico @@ -23,7 +24,7 @@ location __PATH__/media/ { expires 30d; } -location __PATH__ { +location __PATH__/ { # Path to source alias __FINALPATH__/ ; @@ -34,4 +35,4 @@ location __PATH__ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} \ No newline at end of file +}