本文章主要介绍了nginx访问url内容过滤,具有不错的的参考价值,希望对您有所帮助,如解说有误或未考虑完全的地方,请您留言指出,谢谢!
当访问的url中含有/%df时返回404
location / {
if ($request_uri ~* "/%df") {
# return 200 "error";
return 404;
}
proxy_pass http://127.0.0.1:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# index index.html index.htm;
}
原创文章,作者:6024010,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/228336.html