From 743514b56a07f53190253f487c1b08872c500f44 Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 1 Jun 2024 19:38:54 +0100 Subject: [PATCH] Return 403 at / --- root/templates/default_nopost.template | 1 + root/templates/default_nopost_ipv4.template | 1 + root/templates/default_post.template | 1 + root/templates/default_post_ipv4.template | 1 + 4 files changed, 4 insertions(+) diff --git a/root/templates/default_nopost.template b/root/templates/default_nopost.template index badf08f..1d57e7c 100644 --- a/root/templates/default_nopost.template +++ b/root/templates/default_nopost.template @@ -58,5 +58,6 @@ server { location ~* ^(/v[\d\.]+)?/tasks {limit_except GET HEAD {deny all;}if ($path_tasks = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/version {limit_except GET HEAD {deny all;}if ($path_version = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/volumes {limit_except GET HEAD {deny all;}if ($path_volumes = 0){return 403;}proxy_pass http://unix:$dockersocket;} + location / {return 403;} } diff --git a/root/templates/default_nopost_ipv4.template b/root/templates/default_nopost_ipv4.template index 9e50c5c..6ca35a5 100644 --- a/root/templates/default_nopost_ipv4.template +++ b/root/templates/default_nopost_ipv4.template @@ -57,5 +57,6 @@ server { location ~* ^(/v[\d\.]+)?/tasks {limit_except GET HEAD {deny all;}if ($path_tasks = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/version {limit_except GET HEAD {deny all;}if ($path_version = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/volumes {limit_except GET HEAD {deny all;}if ($path_volumes = 0){return 403;}proxy_pass http://unix:$dockersocket;} + location / {return 403;} } diff --git a/root/templates/default_post.template b/root/templates/default_post.template index 31af5d5..7319642 100644 --- a/root/templates/default_post.template +++ b/root/templates/default_post.template @@ -58,5 +58,6 @@ server { location ~* ^(/v[\d\.]+)?/tasks {if ($path_tasks = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/version {if ($path_version = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/volumes {if ($path_volumes = 0){return 403;}proxy_pass http://unix:$dockersocket;} + location / {return 403;} } diff --git a/root/templates/default_post_ipv4.template b/root/templates/default_post_ipv4.template index b8a0643..94bf9da 100644 --- a/root/templates/default_post_ipv4.template +++ b/root/templates/default_post_ipv4.template @@ -57,5 +57,6 @@ server { location ~* ^(/v[\d\.]+)?/tasks {if ($path_tasks = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/version {if ($path_version = 0){return 403;}proxy_pass http://unix:$dockersocket;} location ~* ^(/v[\d\.]+)?/volumes {if ($path_volumes = 0){return 403;}proxy_pass http://unix:$dockersocket;} + location / {return 403;} }