From 4d1500e0f330ec754470a78a1d6ba36bb803d7e9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 13 May 2021 12:34:53 +0200 Subject: [PATCH] outposts/proxy: revert to using request Host for redirect URI Signed-off-by: Jens Langhammer --- outpost/pkg/proxy/oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outpost/pkg/proxy/oauth.go b/outpost/pkg/proxy/oauth.go index 9d1d894fa..93a103241 100644 --- a/outpost/pkg/proxy/oauth.go +++ b/outpost/pkg/proxy/oauth.go @@ -161,7 +161,7 @@ func (p *OAuthProxy) OAuthStart(rw http.ResponseWriter, req *http.Request) { p.ErrorPage(rw, http.StatusInternalServerError, "Internal Server Error", err.Error()) return } - redirectURI := p.GetRedirectURI(getHost(req)) + redirectURI := p.GetRedirectURI(req.Host) http.Redirect(rw, req, p.provider.GetLoginURL(redirectURI, fmt.Sprintf("%v:%v", nonce, redirect)), http.StatusFound) }