fix(crowdsec): 优化限速相关配置
这个提交包含在:
@@ -35,6 +35,8 @@ spec:
|
||||
# 自定义错误页面
|
||||
custom-http-errors: "403,404,502,503"
|
||||
http-snippet: |
|
||||
# lua插件配置
|
||||
lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
|
||||
# 缓存配置
|
||||
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;
|
||||
@@ -42,12 +44,12 @@ spec:
|
||||
proxy_cache_use_stale updating;
|
||||
# 限速配置
|
||||
limit_req_zone $binary_remote_addr zone=global_limit:10m rate=10r/s;
|
||||
server-snippet : |
|
||||
# dns配置
|
||||
server-snippet: |
|
||||
# dns配置 配置在http块下会出现重复配置 所以配置在server块下
|
||||
resolver 169.254.20.10 10.43.0.10 ipv6=off;
|
||||
location-snippet: |
|
||||
# 限速配置
|
||||
limit_req zone=global_limit burst=30 nodelay;
|
||||
limit_req zone=global_limit burst=20 nodelay;
|
||||
# 启用geoip2模块
|
||||
use-geoip: "false"
|
||||
use-geoip2: "true"
|
||||
@@ -102,7 +104,7 @@ spec:
|
||||
plugins: "crowdsec"
|
||||
lua-shared-dicts: "crowdsec_cache: 50m"
|
||||
# 启用geoip2模块
|
||||
maxmindLicenseKey: "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"
|
||||
maxmindLicenseKey: "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"
|
||||
extraArgs:
|
||||
default-ssl-certificate: "infra-net/dev-cm-crt"
|
||||
# crowdsec插件配置
|
||||
@@ -117,6 +119,8 @@ spec:
|
||||
value: "rgILO2mh/t+30LMvzyyMXbfHRmDfBkDDkhEflzHaoQ0"
|
||||
- name: BOUNCER_CONFIG
|
||||
value: "/crowdsec/crowdsec-bouncer.conf"
|
||||
- name: MODE
|
||||
value: "stream"
|
||||
- name: CAPTCHA_PROVIDER
|
||||
value: "turnstile"
|
||||
- name: SITE_KEY
|
||||
|
||||
在新议题中引用
屏蔽一个用户