首页 > 技术文章 > nginx访问url内容过滤

caidingyu 2019-11-12 15:36 原文

 当访问的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;
  }

  

推荐阅读