Veit's Blog

Hej! đź‘‹ Welcome to my curated space of insights on software development and the tapestry of life.

Remove "Server" and "X-Powered-By" Response Headers in Wildfly

2016-01-22

As you may have noticed WildFly identifies himself in the response headers:

Connection: keep-alive
X-Powered-By: Undertow/1
Server: WildFly/9
Content-Type: application/json
Content-Length: 834
Date: Fri, 22 Jan 2016 15:20:23 GMT

To remove this you just have to comment/remove the following lines under the urn:jboss:domain:undertow:2.0 (depend on your WildFly version) subsystem in your standalone.xml:

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