getClientIPAddress() is returning null #220
-
I'm using usual loader in a route.
getClientIPAddress(request.headers) is returning Here's the contents of request.header:
I started with the remix-mantine template, currently have:
This is the entry.server file: Can't figure out the issue. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
None of the headers used to find out the client IP address is on your request, in that case Those headers are usually added by CDNs, your deployment platform, or another proxy, so in local you either need to run one yourself (e.g. NGINX) or use a fallback only for development. This is the full list of headers remix-utils/src/server/get-client-ip-address.ts Lines 8 to 23 in a2324ac |
Beta Was this translation helpful? Give feedback.
None of the headers used to find out the client IP address is on your request, in that case
getClientIPAddress
will returnnull
because it couldn't find it.Those headers are usually added by CDNs, your deployment platform, or another proxy, so in local you either need to run one yourself (e.g. NGINX) or use a fallback only for development.
This is the full list of headers
remix-utils/src/server/get-client-ip-address.ts
Lines 8 to 23 in a2324ac