My company is packaging an Angular app into an ear file and deploying to an open liberty container
Recently we’ve run into an issue where after new deployments some users had the previous versions cached and encountered issues, from reading the best solution is to stop the caching of the index.html file server side, so adding cache-control to no-cache or no-store
Reading the docs I can see that I can easily add a header in the server.xml – https://openliberty.io/docs/latest/reference/config/httpEndpoint.html#headers
But how do I/can I configure it to only apply to the index.html file?
In nginx I can do it simply like this:
location = /index.html {
internal;
add_header Cache-Control 'no-store';
}
or pattern:
location = /index.html {
internal;
add_header Cache-Control 'no-store';
}