最近发现有些攻击利用post请求绕过百度云加速防火墙的情况
upstream tomcat {ip_hash;server 192.168.2.187:8080;}location ~* / {if ($request_method = PUT ) {return 403;}if ($request_method = DELETE ) {return 403;}if ($request_method = POST ) {return 403;}proxy_method GET;proxy_pass http://tomcat;}
当路径包含/的时候,则代理到server后端进行请求数据。这里屏蔽了PUT,DELETE,POST方法,只是使用了GET。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。