mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-30 17:37:25 +02:00
proxy: fix sign out redirect (#3827)
* proxy: fix sign out redirect * add test
This commit is contained in:
parent
c048af7523
commit
753eeff12f
2 changed files with 8 additions and 2 deletions
|
@ -75,7 +75,9 @@ func (p *Proxy) SignOut(w http.ResponseWriter, r *http.Request) error {
|
|||
redirectURL = uri
|
||||
}
|
||||
|
||||
dashboardURL := *state.authenticateDashboardURL
|
||||
dashboardURL := state.authenticateDashboardURL.ResolveReference(&url.URL{
|
||||
Path: "/.pomerium/sign_out",
|
||||
})
|
||||
q := dashboardURL.Query()
|
||||
if redirectURL != nil {
|
||||
q.Set(urlutil.QueryRedirectURI, redirectURL.String())
|
||||
|
@ -83,7 +85,7 @@ func (p *Proxy) SignOut(w http.ResponseWriter, r *http.Request) error {
|
|||
dashboardURL.RawQuery = q.Encode()
|
||||
|
||||
state.sessionStore.ClearSession(w, r)
|
||||
httputil.Redirect(w, r, urlutil.NewSignedURL(state.sharedKey, &dashboardURL).String(), http.StatusFound)
|
||||
httputil.Redirect(w, r, urlutil.NewSignedURL(state.sharedKey, dashboardURL).String(), http.StatusFound)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue