I am working on a application where we need to have control of certain REST endpoints to allow caching by a CDN. We want to use the rest easy annotations to control this. We also require all content to be authenticated. The dfault behavior of undertow is to add "no-cache, no-store, must-revalidate" to all responses. and several other headers to prevent caching.
Looking at the undertow source there is a deployment configuration "disableCachingForSecuredPages" that controls this behavior. But the wildfly configuration for undertow does not support this setting that I could find.
Is there a way to maybe remove a handler from undertow? Or is there a way to modify the underlying subsystem directly?
For time being you can modify that configuration option of DeploymentInfo by implementing your own ServletExtension
which gives you access to all metadata before deployment is done, so you can modify config or add / remove handlers as you want.