Remove “Server” and “X-Powered-By” headers in wildfly 8.2.0

Just remove the following two lines

<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>

from your undertow config in standalone.xml. They are found under subsystem urn:jboss:domain:undertow:1.2 > server > host.

Don’t forget to reload/-start your application server after these changes.

You could also remove the definitions of the two filters:

<response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

These are also found in the undertow subsystem under filters. If you only remove these definitions and forget the references you will get errors on server startup.

Leave a Comment