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

[Bug]: Express 'trust proxy' setting is false (default) #3912

Closed
2 tasks done
MarianoRD opened this issue Nov 27, 2024 · 1 comment
Closed
2 tasks done

[Bug]: Express 'trust proxy' setting is false (default) #3912

MarianoRD opened this issue Nov 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MarianoRD
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

Actual is not passing the trust proxy value to Express and is setup as false.

Error logs:

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> (file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:154:15)
     at _Validations.wrap (file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:287:18)
     at _Validations.xForwardedForHeader (file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:152:10)
     at Object.keyGenerator (file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:516:19)
     at file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:569:32
     at async file:///var/www/actual-server/node_modules/express-rate-limit/dist/index.mjs:550:5 {
   code: 'ERR_ERL_UNEXPECTED_X_FORWARDED_FOR',
   help: 'https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/'
 }

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Firefox, Chrome

Operating System

Mac OSX

@MarianoRD MarianoRD added the bug Something isn't working label Nov 27, 2024
@MarianoRD MarianoRD changed the title [Bug]: [Bug]: Express 'trust proxy' setting is false (default) Nov 27, 2024
@MarianoRD
Copy link
Author

Duplicate of actualbudget/actual-server#392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant