I am hosting my play REST API in a remote unix machine with a.b.c.d ip address and trying to trigger the routes from my browser in windows machine with different IP address. In the code I am trying to capture IP address and hostname of requestor using request().remoteAddress() and request().host() methods but every time I get IP address of the unix machine not the requestor address. How do I capture requestor IP?
Asked
Active
Viewed 348 times
2
-
may work ? http://stackoverflow.com/questions/4678797/how-do-i-get-the-remote-address-of-a-client-in-servlet – Leonardo Lana Sep 15 '16 at 17:49
-
This has Play! specific info http://stackoverflow.com/questions/11721215/how-to-get-ip-address-of-the-client-in-play-framework-2-0 – Dinesh Babu K G Sep 15 '16 at 18:08