diff --git a/map_block_http_methods.conf b/map_block_http_methods.conf new file mode 100644 index 00000000..d5308384 --- /dev/null +++ b/map_block_http_methods.conf @@ -0,0 +1,11 @@ +# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*- + +### This file contains a map directive that is used to block the +### invocation of HTTP methods. Out of the box it allows for HEAD, GET and POST. + +map $request_method $not_allowed_method { + default 1; + GET 0; + HEAD 0; + POST 0; +}