Example used in testcase request method = "POSTsss" I would like to allow GET / POST / DELETE methods only. otherwise send 501 response. if ($request_method !~* ^(GET|DELETE|POST)$ ) { return 501 '{ "ver": "1.1.2", "txnid": "", "timestamp": "", "errorCode": "NotImplemented", "errorMsg": "Request Method is not implemented"}'; }
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290451,290452#msg-290452 _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx