nginx_limit_access_module特定变量拒绝工具

联合创作 · 2023-10-01 15:40

nginx_limit_access_module - 可通过指定的 HTTP POST 接口中的值来拒绝请求。


示例配置:



http {

limit_access_zone zone=one:5m bucket_number=10007 type=ip;

server {
listen 80;
server_name localhost;

limit_access_variable zone=one $limit_access_deny;

location / {
root html;
index index.html index.htm;

if ($limit_access_deny) {
return 403;
}
}

location /limit_interface {
allow 192.168.1.0/24;
deny all;
limit_access_interface zone=one;
}
}
}

 

浏览 12
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报