nginx as a reverse proxy to limit http verb access nginx as a reverse proxy to limit http verb access nginx nginx

nginx as a reverse proxy to limit http verb access


Try using the limit_except directive instead. It's better to avoid using if because if is evil.

limit_except GET {  deny   all;}

Reference


You can get access to the HTTP request type from the $request_method variable. So:

location / {  if ($request_method = 'GET') {    proxy_pass couchdb_backend;  }}