mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
prevent caching openapi files, so that the documentation is always up to date
This commit is contained in:
@@ -221,6 +221,12 @@ public class CommaFeedApplication extends Application<CommaFeedConfiguration> {
|
|||||||
environment.servlets()
|
environment.servlets()
|
||||||
.addFilter("index-cache-busting-filter", new CacheBustingFilter())
|
.addFilter("index-cache-busting-filter", new CacheBustingFilter())
|
||||||
.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/");
|
.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/");
|
||||||
|
|
||||||
|
// prevent caching openapi files, so that the documentation is always up to date
|
||||||
|
environment.servlets()
|
||||||
|
.addFilter("openapi-cache-busting-filter", new CacheBustingFilter())
|
||||||
|
.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/openapi.json", "/openapi.yaml");
|
||||||
|
|
||||||
// prevent caching REST resources, except for favicons
|
// prevent caching REST resources, except for favicons
|
||||||
environment.servlets().addFilter("rest-cache-busting-filter", new CacheBustingFilter() {
|
environment.servlets().addFilter("rest-cache-busting-filter", new CacheBustingFilter() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user