Skip to content

Commit

Permalink
[KEYCLOAK-9452] redirections should instruct browser to disable cachi…
Browse files Browse the repository at this point in the history
…ng (louketo#451)

* [KEYCLOAK-9452] Added cache-control header to redirections
- Fix a typo in Cache-Control headers
Signed-off-by: Frederic BIDON <[email protected]>
  • Loading branch information
fredbi authored and Bruno Oliveira da Silva committed Sep 9, 2019
1 parent 4205e4b commit 6f6e25d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (r *oauthProxy) accessForbidden(w http.ResponseWriter, req *http.Request) c

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

return r.revokeProxy(w, req)
Expand Down

0 comments on commit 6f6e25d

Please sign in to comment.