I have a tomcat 8 web applications server and it has a running application (/app). This /app can be accessed from both internal and external HTTP GET requests but 1 request from external should be filtered and returns error if it is not requested from localhost.
The request has this pattern /app?query=delete&id=a, it should work if it is http://localhost:8080/app?query=deletel&id=a, but not http://domain:8080/app?query=delete&id=a.
How can I do it only with tomcat 8 or firewall if necessary? I'm using Linux system.