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

Fixed clobbering of user-configured redirectURL #678

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
4 changes: 3 additions & 1 deletion oauthproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ func NewOAuthProxy(opts *Options, validator func(string) bool) *OAuthProxy {
}

redirectURL := opts.redirectURL
redirectURL.Path = fmt.Sprintf("%s/callback", opts.ProxyPrefix)
if redirectURL.String() == "" {
redirectURL.Path = fmt.Sprintf("%s/callback", opts.ProxyPrefix)
}

log.Printf("OAuthProxy configured for %s Client ID: %s", opts.provider.Data().ProviderName, opts.ClientID)
refresh := "disabled"
Expand Down