Skip to content

Commit bc076ca

Browse files
chore: update README.md
1 parent 7dff093 commit bc076ca

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,13 +1097,20 @@ with InfluxDBClient(url="http://localhost:8086",
10971097

10981098
If your proxy notify the client with permanent redirect (`HTTP 301`) to **different host**. The client removes `Authorization` header, because otherwise the contents of `Authorization` is sent to third parties which is a security vulnerability.
10991099

1100-
You can change this behaviour by:
1100+
You can change this behavior by doing this in older urllib3 versions:
11011101

11021102
``` python
11031103
from urllib3 import Retry
11041104
Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT = frozenset()
11051105
Retry.DEFAULT.remove_headers_on_redirect = Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT
11061106
```
1107+
In the newer urllib3 versions, try to use this:
1108+
1109+
``` python
1110+
retries = Retry(redirect=1, remove_headers_on_redirect=[])
1111+
self.influxdb_client = InfluxDBClient(url="http://localhost", token="my-token", org="my-org", retries=retries)
1112+
```
1113+
11071114
<!-- marker-proxy-end -->
11081115

11091116
### Delete data

0 commit comments

Comments
 (0)