Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Prevent overwriting Authorization with basic auth (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
zgy730 authored Sep 9, 2021
1 parent 2c3d49c commit 7cb5656
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion influxdb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@ def request(self, url, method='GET', params=None, data=None, stream=False,
_try = 0
while retry:
try:
auth = (self._username, self._password)
if "Authorization" in headers:
auth = (None, None)
else:
auth = (self._username, self._password)
response = self._session.request(
method=method,
url=url,
Expand Down

0 comments on commit 7cb5656

Please sign in to comment.