mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-28 07:28:08 +02:00
proxy: fix sign out redirect
This commit is contained in:
parent
c048af7523
commit
78564d0bed
1 changed files with 4 additions and 2 deletions
|
@ -75,7 +75,9 @@ func (p *Proxy) SignOut(w http.ResponseWriter, r *http.Request) error {
|
||||||
redirectURL = uri
|
redirectURL = uri
|
||||||
}
|
}
|
||||||
|
|
||||||
dashboardURL := *state.authenticateDashboardURL
|
dashboardURL := state.authenticateDashboardURL.ResolveReference(&url.URL{
|
||||||
|
Path: "/.pomerium/sign_out",
|
||||||
|
})
|
||||||
q := dashboardURL.Query()
|
q := dashboardURL.Query()
|
||||||
if redirectURL != nil {
|
if redirectURL != nil {
|
||||||
q.Set(urlutil.QueryRedirectURI, redirectURL.String())
|
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()
|
dashboardURL.RawQuery = q.Encode()
|
||||||
|
|
||||||
state.sessionStore.ClearSession(w, r)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue