Get rid of Wildfly/JBoss headers “Server” and “X-Powered-By”

If you don’t want to send these headers with every response you have to disable them in your configuration file (standalone.xml).

I just removed the following lines from my undertow subsystem (urn:jboss:domain:undertow:1.1):

<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
...
<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"/>

After a server restart the headers were gone.

Leave a Comment