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