Vendure on Railway - store part - proxy problem
h2oicsaba
HOBBYOP

a year 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%5FERL%5FUNEXPECTED%5FX%5FFORWARDED%5FFOR/ 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

Pinned Solution

a year 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 Replies

a year 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


h2oicsaba
HOBBYOP

a year 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 ...

a year ago

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


h2oicsaba
HOBBYOP

a year 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


a year ago

Hoorah!


a year 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 Open brody 12 months ago


Status changed to Solved brody 12 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...