1
0
mirror of synced 2026-08-05 09:47:05 +00:00

Cache headers only if no cache headers set

Fixes: gh-5005
This commit is contained in:
Rob Winch
2018-02-07 14:43:27 -06:00
parent 0e02b489c8
commit f81b58112b
4 changed files with 108 additions and 26 deletions
@@ -71,8 +71,8 @@ public class HttpSecurityHeadersTests {
mockMvc.perform(get("/resources/file.js"))
.andExpect(status().isOk())
.andExpect(header().string(HttpHeaders.CACHE_CONTROL,"max-age=12345"))
.andExpect(header().string(HttpHeaders.PRAGMA, ""))
.andExpect(header().string(HttpHeaders.EXPIRES, ""));
.andExpect(header().doesNotExist(HttpHeaders.PRAGMA))
.andExpect(header().doesNotExist(HttpHeaders.EXPIRES));
}
@Test