6 days ago
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.
so according to this
i put EXPRESS_RATE_LIMIT_TRUST_PROXY = 'true'
and using
app.set('trust proxy', true);
but the error still persist ...
6 Replies
6 days ago
I believe you have to set the "number of proxies", not true.
app.set('trust proxy', 1)
If 1 still doesn't work, you may have more than one. Look at this page to find the "magic number".
https://express-rate-limit.mintlify.app/guides/troubleshooting-proxy-issues
6 days ago
Thanks for reply - yes i figure out here i need 1 not true - but still nothing ...
h2oicsaba
Thanks for reply - yes i figure out here i need 1 not true - but still nothing ...
6 days ago
Have you followed the instructions to "find the magic number"?
6 days ago
yes and I need here number 2 !!
TNX loudbook !@!
So this was the issue . Using Railway - with Vendure you have 2 levels of proxy
6 days ago
FYI - I would recommend loading that as an environmental variable. Other people who may want to host this could have issues with a hardcoded value.
Status changed to Solved parmstar • 6 days ago
Status changed to Open brody • 4 days ago
Status changed to Solved brody • 4 days ago