Skip to content

Fix: Update authorization header check in doRequest function #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changes/unreleased/fixed-20250407-075519.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: fixed
body: Update authorization header check in doRequest function
time: 2025-04-07T07:55:19.134489393Z
custom:
Issue: "686"
2 changes: 1 addition & 1 deletion internal/api/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (client *Client) doRequest(ctx context.Context, token *string, request *htt

httpClient := http.DefaultClient

if request.Header["Authorization"] == nil {
if request.Header.Get("Authorization") == "" {
request.Header.Set("Authorization", "Bearer "+*token)
}

Expand Down