Skip to content

Commit ded7305

Browse files
refactor: use Authorization header for authenticating sse
1 parent 7428cae commit ded7305

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posthog/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,9 +2269,9 @@ def _setup_sse_connection(self):
22692269
# Use requests with stream=True for SSE
22702270
import requests # type: ignore[import-untyped]
22712271

2272-
url = f"{self.host}/flags/definitions/stream?api_key={self.api_key}"
2272+
url = f"{self.host}/flags/definitions/stream"
22732273
headers = {
2274-
"Authorization": f"Bearer {self.personal_api_key}",
2274+
"Authorization": f"Bearer {self.api_key}",
22752275
"Accept": "text/event-stream",
22762276
}
22772277

0 commit comments

Comments
 (0)