Skip to content

Commit

Permalink
Merge pull request #1343 from tufanbarisyildirim/auth_endpoint_1336
Browse files Browse the repository at this point in the history
look for schema separator instead of http on checking auth endpoint
  • Loading branch information
ploxiln authored May 12, 2021
2 parents 1039fc5 + 19a913c commit d0f7412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/auth/authorizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func QueryAuthd(authd string, remoteIP string, tlsEnabled bool, commonName strin
v.Set("common_name", commonName)

var endpoint string
if strings.HasPrefix(authd, "http") {
if strings.Contains(authd, "://") {
endpoint = fmt.Sprintf("%s?%s", authd, v.Encode())
} else {
endpoint = fmt.Sprintf("http://%s/auth?%s", authd, v.Encode())
Expand Down

0 comments on commit d0f7412

Please sign in to comment.