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

  

posted @ 2019-11-12 15:36  也曾少年  阅读(4344)  评论(0编辑  收藏  举报