Skip to content

X-Forwarded-For header doesn't contain client IP #167

@jeroenvisser101

Description

@jeroenvisser101

With a standard Rails app deployed, the remote address is taken from the X-Forwarded-For header in case the request originates from a internal IP (internal IP addresses are trusted proxies by default).

However, when deployed on Deis, both REMOTE_ADDR and X-Forwarded-For contain internal IP addresses:

HTTP_X_FORWARDED_FOR: 10.132.0.2 # Not sure who owns this IP
REMOTE_ADDR: 10.0.0.5 # The IP of the deis-router pod

None of which are the actual client IP. Is there a way to make sure the client IP is available from the application? Or is this a bug?

(my deis cluster is deployed on GKE)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions