Hi, On Mon, Apr 6, 2020 at 9:32 AM Vijay Roy <royvija...@gmail.com> wrote:
> Hi Team , > > We are using tomcat in one of our projects and we have tomcat ports 8080 > and 8081 opened by the following configurations. > > <Connector port="8080" protocol="HTTP/1.1" > server="" > connectionTimeout="20000" > redirectPort="8443" maxHttpHeaderSize="16384"/> > <Connector port="8081" protocol="HTTP/1.1" > server="" > connectionTimeout="20000" > redirectPort="8443" maxHttpHeaderSize="16384"/> > > Now we want to allow only specific url on each port. For eg urls > contaning text /request1 should be allowed to access only on port 8080 and > if /request1 is sent to port 8081 it should be blocked and vice versa. > > Could you please let us know what are the configurations that are required > if we have configure this behavior in our tomcat. You could use a simple Servlet Filter that uses #getLocalPort() and #getRequestURI() to implement simple authorization strategy. There is nothing Tomcat specific in it. You can reuse it on any Servlet container. Regards, Martin > > > Tomcat Version Used :- 8.5.24 > OS Name: Linux > OS Version: 3.10.0-1062.12.1.el7.x86_64 > > Thanks & Regards > Vijay >