Home > Article > Operation and Maintenance > How to disable unnecessary HTTP methods in Nginx server
Ban unnecessary HTTP methods
For example, some web sites and applications can only support GET, POST and HEAD methods.
Add the following method to the server module in the configuration file to prevent some spoofing attacks
if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; }
The above is the detailed content of How to disable unnecessary HTTP methods in Nginx server. For more information, please follow other related articles on the PHP Chinese website!