Get the user IP address #2413
-
Hi, I can't figure out how to access the user IP address in the loader. Searched the docs but couldn't find anything either. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You should read this from whatever header you trust most. It's not a simple problem, see for example: https://adam-p.ca/blog/2022/03/x-forwarded-for/ |
Beta Was this translation helpful? Give feedback.
-
If you're running Express, it provides Looking at the source for Check out: https://expressjs.com/en/guide/behind-proxies.html |
Beta Was this translation helpful? Give feedback.
-
Wanted to resurface this question... I'm noticing that when I deploy on Fly.io, the request is actually missing the headers set by Fly... https://fly.io/docs/reference/services/#http Is that to be expected? Is there any way I can change this behavior? |
Beta Was this translation helpful? Give feedback.
You should read this from whatever header you trust most.
It's not a simple problem, see for example: https://adam-p.ca/blog/2022/03/x-forwarded-for/