麟の随笔

  • 游戏
  • 影视
  • Tech
  1. 首页
  2. 科技
  3. 技巧
  4. 正文

nginx $request_uri map 白名单

2024年7月16日 1077点热度 0人点赞 0条评论

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    keepalive_timeout  65;

    #gzip  on;
    map_hash_max_size 550;
    map_hash_bucket_size 500;
    map $request_uri $allow_uri {
        default 0;
        ~/api/xxx\?.* 1;
        ~/api/xxxs\?.* 1;
    }

    server {
        location / {
            if ( $allow_uri != 1 )
            {
                return 403;
            }
            proxy_pass   xxx:444;
        }
    }

}
标签: 暂无
最后更新:2024年7月16日

晓虎

必须有人浴血奋战,世上才有自由可言!

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2024 kirinz.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

闽ICP备19013981号