HTTP and HTTPS protocol has several request methods. POST, GET, PUT, PATCH, HEAD and DELETE. When we configuraing NGINX web server we need to restrict PUT,PATCH and DELETE request methods. Only POST, GET and HEAD methods enough to enable from web sever.
Configurations
For Static Content
location /request {
if ( $request_method !~ ^(GET|POST|HEAD)$ )
{
return 405;
}
root /usr/share/nginx/html;
}
For Proxy Pass


No comments:
Post a Comment