Skip to content

Commit c7931aa

Browse files
authored
Merge pull request #7 from mercedes-benz/copilot/fix-authorization-server-condition
Fix: Only set custom OAuth AuthorizationServer when gh-host is configured
2 parents 0ef5a75 + 3faac62 commit c7931aa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/http/server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ func RunHTTPServer(cfg ServerConfig) error {
126126
oauthCfg := &oauth.Config{
127127
BaseURL: cfg.BaseURL,
128128
ResourcePath: cfg.ResourcePath,
129-
AuthorizationServer: cfg.Host + "login/oauth",
129+
}
130+
if cfg.Host != "" {
131+
oauthCfg.AuthorizationServer = cfg.Host + "login/oauth"
130132
}
131133

132134
serverOptions := []HandlerOption{}

0 commit comments

Comments
 (0)