Hello list,
Can anybody tell me if the bellow constructs are equivalent?
server {
…
if ( $request_method !~ ^(?:GET|HEAD|POST)$ ) { return 444; }
…
server {
…
location / {
limit_except GET HEAD POST { deny all; }
…
And, if they are equivalent, in the case of having multiple locations,
is it still better to have a limit_except for each location? Or, in
this case is it better to have a single “if ( $request_method …” at
server level ?
Thank you,
Mark