Regarding the client IP address and user.getIpAddress()
Posted: 09 Jan 2026, 06:06
Hello..
My architecture is:
Client -> CloudFront -> Nginx -> SFS
CloudFront automatically adds the X-Forwarded-For header, and my Nginx also forwards the X-Forwarded-For header.
My other HTTP backend in Nginx can retrieve the client's real IP using X-Forwarded-For. However, in SFS, the retrieved IP is 127.0.0.1.
Why is this?
I have already enabled the following in my web server:
How does SFS obtain the client's real IP address?
If the HTTP header contains X-Forwarded-For, is it retrieved first?
My architecture is:
Client -> CloudFront -> Nginx -> SFS
CloudFront automatically adds the X-Forwarded-For header, and my Nginx also forwards the X-Forwarded-For header.
My other HTTP backend in Nginx can retrieve the client's real IP using X-Forwarded-For. However, in SFS, the retrieved IP is 127.0.0.1.
Why is this?
I have already enabled the following in my web server:
How does SFS obtain the client's real IP address?
If the HTTP header contains X-Forwarded-For, is it retrieved first?