Welcome! Log In Create A New Profile

Advanced

restricting the http method for all location and enable the same for specific location

Rathore, Rajendra
July 24, 2023 06:38AM
Hi Team,

We are looking for restricting the http method for all location and enable the same for specific location, I found the way in Apache http server, I am unable to find the same in NGINX, can you please guide me here, how to achieve it.


Code snippet works in Apache Http server:
<LocationMatch "/ABCD/*">
AllowMethods GET HEAD POST PUT DELETE /*disable the methods*/
</LocationMatch>

/*enable same method using below code*/
<LocationMatch "/Windchill/oauth/servlet/odata/PTC/GetCSRFToken()">
AllowMethods GET HEAD POST PUT DELETE OPTIONS
</LocationMatch>




Thanks and Regards,
Rajendra Rathore
9922701491

_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

restricting the http method for all location and enable the same for specific location

Rathore, Rajendra July 24, 2023 06:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 217
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