mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
webauthn: use absolute URL for delete redirect (#2935)
* authenticate: add callback endpoint * webauthn: use absolute URL for delete redirect
This commit is contained in:
parent
b019b61ccb
commit
8d882ce9c9
1 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/pomerium/csrf"
|
"github.com/pomerium/csrf"
|
||||||
|
@ -340,7 +341,9 @@ func (h *Handler) handleUnregister(w http.ResponseWriter, r *http.Request, state
|
||||||
|
|
||||||
// remove the credential from the session
|
// remove the credential from the session
|
||||||
state.Session.DeviceCredentials = removeSessionDeviceCredential(state.Session.DeviceCredentials, deviceCredentialID)
|
state.Session.DeviceCredentials = removeSessionDeviceCredential(state.Session.DeviceCredentials, deviceCredentialID)
|
||||||
return h.saveSessionAndRedirect(w, r, state, "/.pomerium")
|
return h.saveSessionAndRedirect(w, r, state, urlutil.GetAbsoluteURL(r).ResolveReference(&url.URL{
|
||||||
|
Path: "/.pomerium",
|
||||||
|
}).String())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) handleView(w http.ResponseWriter, r *http.Request, state *State) error {
|
func (h *Handler) handleView(w http.ResponseWriter, r *http.Request, state *State) error {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue