Home > Blockchain >  How to add Cache-Control, Pragma and expires in Tomcat 8.5 web.xml?
How to add Cache-Control, Pragma and expires in Tomcat 8.5 web.xml?

Time:11-18

I need to add

Cache-Control: no-cache, no-store, must-revalidate Pragma: no-cache Expires: 0

This needs to be added in the web.xml for all APIs. The Expires Filter of Apache doesn't seem to work for this. Are there any other filters that I can use? I also don't think Apache httpd headers will work in web.xml

CodePudding user response:

Managed to do it by adding custom headers using a response header filter that I found on Github

  • Related