-
1. Re: Disabling Undertow X-Powered-By in WildFly 8.2
jewellgm Jul 30, 2015 12:16 PM (in response to czacharym)Have you tried removing the following line from the Undertow subsystem configuration in your standalone.xml?
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
-
2. Re: Disabling Undertow X-Powered-By in WildFly 8.2
ctomc Jul 30, 2015 12:47 PM (in response to jewellgm)in undertow subsystem remove
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
from default-host configuration
-
3. Re: Disabling Undertow X-Powered-By in WildFly 8.2
czacharym Jul 30, 2015 1:19 PM (in response to ctomc)Thank you Tomaz.
Could this be configurable in future releases?
-
4. Re: Disabling Undertow X-Powered-By in WildFly 8.2
czacharym Jul 30, 2015 1:20 PM (in response to jewellgm)Thanks Greg.
-
5. Re: Disabling Undertow X-Powered-By in WildFly 8.2
ctomc Jul 31, 2015 5:01 AM (in response to czacharym)Well, what else is that?
whole standalone.xml is configuration.
you can also configure it via cli or admin console, or even rest api if you want that.
-
6. Re: Disabling Undertow X-Powered-By in WildFly 8.2
czacharym Jul 31, 2015 8:35 AM (in response to ctomc)Tomaz,
I was merely asking the question of having the option to enable/disable this in the web console as is the option to enable/disable the JSP X-Powered-By is already there. I posted this on the issue.jboss.org site which was rejected. Please excuse my ignorance.
Thanks
-
7. Re: Disabling Undertow X-Powered-By in WildFly 8.2
cactus12 May 7, 2019 11:39 AM (in response to czacharym)Removing those items from standalone.xml does not seem to remove the x-powered-by: JSP/2.3 header any longer.
This worked using Wildfly 11, but when I reused the <filters> subsection of the config for Wildfly 15 with those items removed, that one header now appears (the undertow one does not).
-
8. Re: Disabling Undertow X-Powered-By in WildFly 8.2
jaikiran May 16, 2019 10:22 AM (in response to cactus12)but when I reused the <filters> subsection of the config for Wildfly 15 with those items removed, that one header now appears (the undertow one does not).
For that version and above you should add a section in the jsp-config of your undertow subsystem to disable x-powered-by (which by default is true). Something like:
<subsystem xmlns="urn:jboss:domain:undertow:8.0" ...>
...
<servlet-container name="default">
<jsp-config x-powered-by="false"/>
...