IP address

This is the archive for IP address.

Dive into the archives.


  • Java, the IP address and reverse proxy

    Okay so there is the getRemoteAddr() method of HttpServletRequest, but when you’re using a reverse proxy that won’t work and it will just return 127.0.0.1
    If so, look for the header ‘X-Forwarded-For‘ of your request object. (request.getHeader(”X-Forwarded-For”)).
    But this will return null if using non-reverse proxy.

    thanks to POLONKAI Gergely