Skip to content

Comments

[_]: feat/trust proxy#353

Open
xabg2 wants to merge 2 commits intomasterfrom
feat/trust-proxy-to-get-real-IP-when-Rate-Limiting
Open

[_]: feat/trust proxy#353
xabg2 wants to merge 2 commits intomasterfrom
feat/trust-proxy-to-get-real-IP-when-Rate-Limiting

Conversation

@xabg2
Copy link
Collaborator

@xabg2 xabg2 commented Feb 13, 2026

Enable trustProxy: 1 in Fastify to correctly resolve the real client IP when running behind Cloudflare.

Without this setting, @fastify/rate-limit uses the proxy IP instead of the user’s IP, causing rate limiting to be applied incorrectly. This change ensures rate limits and request metadata are based on the actual client IP.

@xabg2 xabg2 self-assigned this Feb 13, 2026
@xabg2 xabg2 added the bug Something isn't working label Feb 13, 2026
@sonarqubecloud
Copy link

@xabg2 xabg2 changed the title [_]: feat/trust in one proxy [_]: feat/trust proxy Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-for-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants