aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-04-06 15:41:42 +0200
committerAnton Khirnov <anton@khirnov.net>2020-04-06 15:42:02 +0200
commit204457489d684724dd07d6c1cd3f4aa97f2eaf29 (patch)
tree21620619ad32dbef8527879f4eab2ba042c96052
parent1cfa2980055ffb9e217b6f5eb4f5fc5cc9b0fc33 (diff)
nginx_config: make sure only GET is allowed on the downstream instanceHEADmaster
-rw-r--r--nginx_config4
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx_config b/nginx_config
index 8a70167..b18fb09 100644
--- a/nginx_config
+++ b/nginx_config
@@ -53,6 +53,10 @@ server {
#ssl_certificate_key <path to TLS key>;
#ssl_dhparam <path to DH params, optional>;
+ if ($request_method !~ ^(GET|HEAD)$) {
+ return 405; # Method Not Allowed
+ }
+
root <path to site root>;
index index.html;