www/etc/nginx/conf.d/security.conf
2024-03-31 09:17:15 -05:00

14 lines
419 B
Text

# https://www.nginx.com/blog/rate-limiting-nginx/
# https://nginx.org/en/docs/http/ngx_http_limit_req_module.html
limit_req_zone $binary_remote_addr zone=normal:10m rate=20r/s;
limit_req zone=normal burst=30 nodelay;
limit_req_status 429;
# https://nginx.org/en/docs/http/ngx_http_core_module.html
server_tokens off;
keepalive_requests 100;
keepalive_timeout 15s;
client_body_timeout 20s;
client_header_timeout 20s;