Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rate limiting key should respect load balancers #37409

Merged
merged 1 commit into from
Nov 20, 2024
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
5 changes: 4 additions & 1 deletion deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ parts.push(`

${isRateLimitingEnabled ? `rate_limit {
zone dynamic_zone {
key {http.request.client_ip}
# This key is designed to work irrespective of any load balancers running on the Appsmith container.
# We use "+" as the separator here since we don't expect it in any of the placeholder values here, and has no
# significance in header value syntax.
key {header.Forwarded}+{header.X-Forwarded-For}+{remote_host}
sharat87 marked this conversation as resolved.
Show resolved Hide resolved
events ${RATE_LIMIT}
window 1s
}
Expand Down
Loading