Using Wildfly 20. I have standard configuration for cache-control, XSS, CSS, Content-Type etc. using filter-ref under the undertow subsystem. When i use Chrome to inspect response header for known pages or paths everything works as expected.
However when i use an invalid resource for example https://ip:port/abcd, which throws a error 404 page not found, the response headers does not contain the cache-control setting. It has all the other filter-ref definition except for the cache-control. Looks like it is being dropped somewhere. Any ideas on how to add this to the error pages?
Here is how its setup:
<host name="default-host" alias="localhost">
<filter-ref name="Cache-Control-header"/>
....
....
</host>
<filters>
<response-header name="Cache-Control-header" header-name="cache-control" header-value="no-cache, no-store, must-revalidate"/>
....
....
</filters>
thanks