Skip to content

Commit

Permalink
Do not send Authorization header with empty token
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Eugene committed Aug 22, 2023
1 parent b1501fa commit 2127ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rating_chgk_v2/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def options(client)
'Content-Type': 'application/json'
}

headers = headers.merge({Authorization: "Bearer #{client.token}"}) if client.token
headers = headers.merge({Authorization: "Bearer #{client.token}"}) unless client.token.empty?

{headers: headers, url: BASE_URL}
end
Expand Down

0 comments on commit 2127ce8

Please sign in to comment.