Skip to content

Commit

Permalink
Add cache-control header to the requests
Browse files Browse the repository at this point in the history
  • Loading branch information
DedunuKarunarathne committed Oct 31, 2024
1 parent f39d4fe commit c638220
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
httpResponse.addHeader("Referrer-Policy", "same-origin");
httpResponse.addHeader("X-XSS-Protection", "1; mode=block");
httpResponse.addHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
httpResponse.addHeader("Cache-Control", "no-cache, no-store, must-revalidate");
filterChain.doFilter(servletRequest, servletResponse);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ public static void setHeaders(Response.ResponseBuilder responseBuilder) {
.header("X-Content-Type-Options", "nosniff")
.header("Referrer-Policy", "same-origin")
.header("X-XSS-Protection", "1; mode=block")
.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload");
.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload")
.header("Cache-Control", "no-cache, no-store, must-revalidate");
}

}

0 comments on commit c638220

Please sign in to comment.