I have Appwrite behind Nginx and followed this guide to forward the real user IP: https://medium.com/@stnguyen90/how-to-run-appwrite-behind-nginx-19348ed34243
This works for e.g. user sessions, it saves the real user IP for each session created but the Locale API (Get user locale, https://appwrite.io/docs/references/1.8.x/client-web/locale#get) still returns the internal docker IP:
{"ip":"172.18.0.1","countryCode":"--","country":"Unknown","continentCode":"--","continent":"Unknown","eu":false,"currency":""}
and no data for country etc.
Is this a bug or am I missing something?
You need to trust the proxy at traefik with
forwardedHeaders.trustedIPs
If I'm not wrong.
https://doc.traefik.io/traefik/reference/install-configuration/entrypoints/#opt-forwardedHeaders-trustedIPs
Yes, I added the forwardedHeaders.insecure and it works for sessions but not the locale for some reason
Not sure then. Cc <@462046107556511744> do you have some idea? π
It has the correct IP for me. You sure something isn't caching that locale response?
Today it works and returns the correct IP, it must have been cached somewhere (tried several browsers yesterday and didn't work in any then), strange π
[CLOSED] Appwrite behind Nginx, locale.get() returns internal IP
Recommended threads
- Clean install of 1.9.0 shows errors in a...
I just run a full clean install of Appwrite on my server following the Manual installation guide in the docs page. The console seems to work, visually there d...
- Setup custom domain on selfhosted behind...
Hello everyone, can anyone help me to setup a custom domain on a selfhosted appwrite instance thats running behind cloudflare tunnels? Current setup: Appwrite r...
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...