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(api-gateway): ratelimit behind reverse proxy #26

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

tuana9a
Copy link
Owner

@tuana9a tuana9a commented Aug 12, 2024

https://express-rate-limit.mintlify.app/reference/error-codes#err-erl-unexpected-x-forwarded-for

ValidationError: The 'X-Forwarded-For' header is set but the Express 'trust proxy' setting is false (default). This could indicate a misconfiguration which would prevent express-rate-limit from accurately identifying users. See https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/ for more information.
    at _Validations.<anonymous> (/app/node_modules/express-rate-limit/dist/index.cjs:180:15)
    at _Validations.wrap (/app/node_modules/express-rate-limit/dist/index.cjs:313:18)
    at _Validations.xForwardedForHeader (/app/node_modules/express-rate-limit/dist/index.cjs:178:10)
    at Object.keyGenerator (/app/node_modules/express-rate-limit/dist/index.cjs:542:19)
    at /app/node_modules/express-rate-limit/dist/index.cjs:595:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /app/node_modules/express-rate-limit/dist/index.cjs:576:5 {
  code: 'ERR_ERL_UNEXPECTED_X_FORWARDED_FOR',
  help: 'https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/'
}

@tuana9a tuana9a merged commit 77de953 into main Aug 12, 2024
2 checks passed
@tuana9a tuana9a deleted the fix-rate-limit-behind-reverse-proxy branch August 12, 2024 01:21
tuana9a added a commit to tuana9a/platform that referenced this pull request Aug 12, 2024
tuana9a added a commit to tuana9a/platform that referenced this pull request Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant