0

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

Ritwik1711
  • 17
  • 4
  • Does this answer your question? [Tomcat: Cache-Control](https://stackoverflow.com/questions/2876250/tomcat-cache-control) – Joe Nov 13 '21 at 11:01
  • 1
    Already seen that. Didn't find any relevant solution. Decided to add custom response headers and see if it works. – Ritwik1711 Nov 14 '21 at 15:12

1 Answers1

0

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

Ritwik1711
  • 17
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 17 '21 at 13:42