feat(nginx): 新增请求速率限制
这个提交包含在:
@@ -34,15 +34,20 @@ spec:
|
||||
ssl-redirect: "true"
|
||||
# 自定义错误页面
|
||||
custom-http-errors: "403,404,502,503"
|
||||
# 缓存配置
|
||||
http-snippet: |
|
||||
# 缓存配置
|
||||
proxy_cache_path /tmp/nginx-cache levels=1:2 keys_zone=cache:2m max_size=100m inactive=7d use_temp_path=off;
|
||||
proxy_cache_key $uri$is_args$args;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_use_stale updating;
|
||||
# dns配置
|
||||
# 限速配置
|
||||
limit_req_zone $binary_remote_addr zone=global_limit:10m rate=10r/s;
|
||||
server-snippet : |
|
||||
# dns配置
|
||||
resolver 169.254.20.10 10.43.0.10 ipv6=off;
|
||||
location-snippet: |
|
||||
# 限速配置
|
||||
limit_req zone=global_limit burst=30 nodelay;
|
||||
# 启用geoip2模块
|
||||
use-geoip: "false"
|
||||
use-geoip2: "true"
|
||||
|
||||
在新议题中引用
屏蔽一个用户