Cache-Control header for a specific context

77 views
Skip to first unread message

sivaganti

unread,
Apr 3, 2023, 5:41:16 AM4/3/23
to WildFly
Hi Team,
                I have multiple web applications (react-based) deployed in wildfly (WildFly Full 26.1.2.Final (WildFly Core 18.1.2.Final) . Based on the context, I am considering setting up a different cache-control header for each web application.

I tried the following in standalone.xml
<filter-ref name="cache-control-filter" predicate='regex(pattern="^/test", value="%U")'/>
 along with the response headers in the filter section
<response-header name="cache-control-filter" header-name="Cache-Control" header-value="no-cache, no-store, must-revalidate"/>
 it's getting applied for all the application contexts.


Example of context what I am looking for along with image attached :
/test : Header,Cache-Control : value max-age
/test1: Header,Cache-Control : no-store , must revalidate
/test2: Header,Cache-Control : Value not required

Regards
Siva



Context.PNG
Reply all
Reply to author
Forward
0 new messages