Vendure on Railway - store part - proxy problem

h2oicsaba
HOBBY

4 months 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 ...

Solved$10 Bounty

6 Replies

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


h2oicsaba
HOBBY

4 months 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 ...

Have you followed the instructions to "find the magic number"?


h2oicsaba
HOBBY

4 months 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


Hoorah!


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 4 months ago


Status changed to Open brody 4 months ago


Status changed to Solved brody 4 months ago


Vendure on Railway - store part - proxy problem - Railway Help Station