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;
  }

  

猜你喜欢

转载自www.cnblogs.com/caidingyu/p/11842467.html