I have a Java servlet application running in Tomcat, there is one admin command that I only want to be able to run from the machine itself (or perhaps my own computer) for security reasons. Therefore, to ensure this, I check the remote HttpServletRequest address that I receive, but it always returns 127.0.0.1, even if the request does not come from the local host
Why can I fix this or is there an alternative way to run my admin command only from the server.
source
share