Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docker-compose/nginx/templates/bb.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ server {
}
}

# Default rate limited zone, with 30 requests per minute
limit_req_zone $request_uri zone=bb:10m rate=30r/m;
# Per-client rate limited zone. This catches scanners walking many unique
# URLs without sharing one bucket across all visitors of a popular URL.
limit_req_zone $binary_remote_addr zone=bb:10m rate=35r/s;
client_max_body_size 10M;

server {
Expand All @@ -32,9 +33,9 @@ server {
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host;

# Use default zone for rate limiting, allow burst of 10 requests with
# no delay
limit_req zone=bb burst=10 nodelay;
# Allow normal page/API bursts, but reject sustained aggressive clients.
limit_req zone=bb burst=150 nodelay;
limit_req_status 429;

location / {
proxy_pass http://127.0.0.1:8010;
Expand Down