From 6c69a2322ec8ff8c0e6622e33849736437db7975 Mon Sep 17 00:00:00 2001 From: Owayss Kabtoul Date: Thu, 10 May 2018 11:56:34 +0200 Subject: [PATCH] Sets the redirect URL default to the original request's path instead of '/' --- oauthproxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauthproxy.go b/oauthproxy.go index 21e5dfc74..2981a9fc5 100644 --- a/oauthproxy.go +++ b/oauthproxy.go @@ -427,7 +427,7 @@ func (p *OAuthProxy) GetRedirect(req *http.Request) (redirect string, err error) redirect = req.Form.Get("rd") if redirect == "" || !strings.HasPrefix(redirect, "/") || strings.HasPrefix(redirect, "//") { - redirect = "/" + redirect = req.URL.Path } return