Welcome! Log In Create A New Profile

Advanced

Re: Request Method Using Mixed case letters.

January 13, 2021 01:07AM
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"}'; }

I am using mixed case letters ( "POSTsss" for request method ) in request methods. nginx finalized http request to 400 because as per the standard Request Method is case sensitive. However it shows HTML response with last line showing "nginx".

Our security team says "you should not disclose web server details in the response for a request" We have implemented solution to hide server name and version.

However, in this case control does not reach any of our server/location block . so that I can override the 400 error.

Please help it out.
Subject Author Posted

Request Method Using Mixed case letters.

sanjay9999 January 12, 2021 04:10AM

Re: Request Method Using Mixed case letters.

sanjay9999 January 12, 2021 04:21AM

Re: Request Method Using Mixed case letters.

Maxim Dounin January 12, 2021 08:38AM

Re: Request Method Using Mixed case letters.

sanjay9999 January 13, 2021 01:04AM

Re: Request Method Using Mixed case letters.

sanjay9999 January 13, 2021 01:07AM

Re: Request Method Using Mixed case letters.

Maxim Dounin January 13, 2021 08:28AM

Re: Request Method Using Mixed case letters.

Jeffrey 'jf' Lim January 13, 2021 09:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready