Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Allow redirect URL to be passed in the query string. #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ func (p *OAuthProxy) SignInPage(rw http.ResponseWriter, req *http.Request, code
if req.Header.Get("X-Auth-Request-Redirect") != "" {
redirect_url = req.Header.Get("X-Auth-Request-Redirect")
}
if rd, ok := req.URL.Query()["rd"]; ok {
redirect_url = rd[0]
}
if redirect_url == p.SignInPath {
redirect_url = "/"
}
Expand Down