mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 07:37:33 +02:00
authenticate: fix internal url with webauthn (#3194)
This commit is contained in:
parent
8d000cea3b
commit
69ba511c64
4 changed files with 47 additions and 31 deletions
|
@ -46,18 +46,5 @@ func (a *Authenticate) getExternalRequest(r *http.Request) *http.Request {
|
|||
return r
|
||||
}
|
||||
|
||||
// if we're not using a different internal URL there's nothing to do
|
||||
if externalURL.String() == internalURL.String() {
|
||||
return r
|
||||
}
|
||||
|
||||
// replace the internal host with the external host
|
||||
er := r.Clone(r.Context())
|
||||
if er.URL.Host == internalURL.Host {
|
||||
er.URL.Host = externalURL.Host
|
||||
}
|
||||
if er.Host == internalURL.Host {
|
||||
er.Host = externalURL.Host
|
||||
}
|
||||
return er
|
||||
return urlutil.GetExternalRequest(internalURL, externalURL, r)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue