Skip to content

Commit 6f6e25d

Browse files
fredbiBruno Oliveira da Silva
authored andcommitted
[KEYCLOAK-9452] redirections should instruct browser to disable caching (louketo#451)
* [KEYCLOAK-9452] Added cache-control header to redirections - Fix a typo in Cache-Control headers Signed-off-by: Frederic BIDON <[email protected]>
1 parent 4205e4b commit 6f6e25d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

misc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func (r *oauthProxy) accessForbidden(w http.ResponseWriter, req *http.Request) c
8484

8585
// redirectToURL redirects the user and aborts the context
8686
func (r *oauthProxy) redirectToURL(url string, w http.ResponseWriter, req *http.Request, statusCode int) context.Context {
87+
w.Header().Add("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0")
8788
http.Redirect(w, req, url, statusCode)
8889

8990
return r.revokeProxy(w, req)

0 commit comments

Comments
 (0)