mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
proxy/forward_auth: don't reset forward auth path if X-Forwarded-Uri is not set (#1447)
This commit is contained in:
parent
cef1449458
commit
a47a3a0be6
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ func (p *Proxy) forwardAuthRedirectToSignInWithURI(w http.ResponseWriter, r *htt
|
|||
|
||||
// Traefik set the uri in the header, we must set it in redirect uri if present. Otherwise, request like
|
||||
// https://example.com/foo will be redirected to https://example.com after authentication.
|
||||
if xfu := r.Header.Get(httputil.HeaderForwardedURI); xfu != "/" {
|
||||
if xfu := r.Header.Get(httputil.HeaderForwardedURI); xfu != "" && xfu != "/" {
|
||||
uri.Path = xfu
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue