Skip to content

Commit 194905d

Browse files
committed
fix bug with redirect endpoint for prod
1 parent 9782946 commit 194905d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sumologic/provider.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ func resolveRedirectURL(accessId string, accessKey string) (string, error) {
8181
}
8282
location := resp.Header.Get("location")
8383
if location == "" {
84-
return location, fmt.Errorf("location header not found")
84+
// location header not found implies there was no redirect needed
85+
// i.e, the desired environment is us1
86+
return "https://api.sumologic.com/api/", nil
8587
}
8688
return strings.Split(location, "v1")[0], nil
8789
}

0 commit comments

Comments
 (0)