Is it possible to change the name of the Tomcat server in the response header?

When an HTTP request is made from a browser, usually the server container sends in the header which server it was.

For tomcat it sends

   Server:Apache-Coyote/1.1

I know that I can rewrite this header for each request, but there is also room for websites and possibly other connections.

So, is there a way to change this at the tomcat configuration level?

+4
source share
2 answers

I just found this after posting a question:

Add this in server.xml to the tomcat configuration folder.

<Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443"
                   server="MYSERVER"
                />

seems to work.

Restart the server.

+1
source

Software, given org.apache.catalina.connector.Connectorthis: connector.setAttribute("server", "Something")

: Coyote , .

0

All Articles