Skip to content
Snippets Groups Projects
Commit 6f6e25d2 authored by fredbi's avatar fredbi Committed by Bruno Oliveira da Silva
Browse files

[KEYCLOAK-9452] redirections should instruct browser to disable caching (#451)


* [KEYCLOAK-9452] Added cache-control header to redirections
- Fix a typo in Cache-Control headers
Signed-off-by: default avatarFrederic BIDON <frederic@oneconcern.com>
parent 4205e4bb
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,7 @@ func (r *oauthProxy) accessForbidden(w http.ResponseWriter, req *http.Request) c ...@@ -84,6 +84,7 @@ func (r *oauthProxy) accessForbidden(w http.ResponseWriter, req *http.Request) c
// redirectToURL redirects the user and aborts the context // redirectToURL redirects the user and aborts the context
func (r *oauthProxy) redirectToURL(url string, w http.ResponseWriter, req *http.Request, statusCode int) context.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) http.Redirect(w, req, url, statusCode)
return r.revokeProxy(w, req) return r.revokeProxy(w, req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment