forked from Archives/Athou_commafeed
after reading the spec, what we want is actually "no-cache" that actually means "cache but revalidate immediately" using If-Modified-Since request headers and 304 response codes
This commit is contained in:
@@ -4,10 +4,10 @@ quarkus.http.test-port=8085
|
|||||||
|
|
||||||
# static files
|
# static files
|
||||||
## make sure the webapp is always up to date
|
## make sure the webapp is always up to date
|
||||||
quarkus.http.filter.index-html.header."Cache-Control"=no-cache, no-store, must-revalidate
|
quarkus.http.filter.index-html.header."Cache-Control"=no-cache
|
||||||
quarkus.http.filter.index-html.matches=/
|
quarkus.http.filter.index-html.matches=/
|
||||||
## make sure the openapi documentation is always up to date
|
## make sure the openapi documentation is always up to date
|
||||||
quarkus.http.filter.openapi.header."Cache-Control"=no-cache, no-store, must-revalidate
|
quarkus.http.filter.openapi.header."Cache-Control"=no-cache
|
||||||
quarkus.http.filter.openapi.matches=/openapi[.](json|yaml)
|
quarkus.http.filter.openapi.matches=/openapi[.](json|yaml)
|
||||||
|
|
||||||
# security
|
# security
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class StaticFilesIT {
|
|||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@ValueSource(strings = { "/", "/openapi.json", "/openapi.yaml" })
|
@ValueSource(strings = { "/", "/openapi.json", "/openapi.yaml" })
|
||||||
void servedWithoutCache(String path) {
|
void servedWithoutCache(String path) {
|
||||||
RestAssured.given().when().get(path).then().statusCode(200).header("Cache-Control", "no-cache, no-store, must-revalidate");
|
RestAssured.given().when().get(path).then().statusCode(200).header("Cache-Control", "no-cache");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
|
|||||||
Reference in New Issue
Block a user