Skip to content

Commit 69e3bbb

Browse files
authored
Update client.go - allow to skip Authorization header (#658)
* Update client.go - allow to skip Authorization header * Update client.go
1 parent ff61bbb commit 69e3bbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (c *Client) setCommonHeaders(req *http.Request) {
175175
// Azure API Key authentication
176176
if c.config.APIType == APITypeAzure {
177177
req.Header.Set(AzureAPIKeyHeader, c.config.authToken)
178-
} else {
178+
} else if c.config.authToken != "" {
179179
// OpenAI or Azure AD authentication
180180
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.config.authToken))
181181
}

0 commit comments

Comments
 (0)