
30 Sep
2020
30 Sep
'20
3:19 p.m.
by forbid access level 1, 2, 4 directory of /srv/result Signed-off-by: Lu Weitao <luweitaobe@163.com> --- container/srv-http/root/etc/nginx/conf.d/default.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/container/srv-http/root/etc/nginx/conf.d/default.conf b/container/srv-http/root/etc/nginx/conf.d/default.conf index 53833eb..2bf55b6 100644 --- a/container/srv-http/root/etc/nginx/conf.d/default.conf +++ b/container/srv-http/root/etc/nginx/conf.d/default.conf @@ -19,4 +19,8 @@ server { add_header Content-Type text/plain; } } + + location ~* ^/result/(([^/]+)?/?|[^/]+/[^/]+/[^/]+/?)$ { + deny all; + } } -- 2.23.0