Reputation: 6462
I run a Play! application inside a docker container and I'm facing a problem. When I call the method remoteAddress
on a request like this:
request => request.remoteAddress
I always get the IP address of the docker container instead of the user address IP.
What can I do in order to be able to retrieve the address IP of the user that made the request to my Play! application?
Upvotes: 0
Views: 960
Reputation: 6054
Try disabling the docker user-land proxy.
Check out these issues on the docker github
Document how to get real remote client ip for service running in container
Disable Userland proxy by default
I believe --userland-proxy=false
is the way to do it.
Upvotes: 1