0

I am working on updating a Tomcat Valve. I want to add a check to see if the caller is coming from localhost/127.0.0.1, which is the case if Apache httpd acts as the frontend webserver on the same machine. So I added a check for the IP address request.getRemoteAddr(). Unfortunately, this method returns the IP address of the client, not of Apache httpd. The current example code can be found here.

I have been searching through the request objects org.apache.coyote.Request and org.apache.catalina.connector.Request, but could not find any method or Object which would return info about the original AJP call.

So my question is: is it possible to get the IP address of the server who does the AJP call?

PaulRailo
  • 11
  • 2
  • possible duplicate of [A question about java web apps and X-REAL-IP header](http://stackoverflow.com/questions/1185627/a-question-about-java-web-apps-and-x-real-ip-header) – Diego Plentz Jul 28 '15 at 19:58
  • Absolutely not a duplicate. The x-real-ip header is a client IP; I am asking about the server IP. – PaulRailo Jul 29 '15 at 21:04

0 Answers0