Skip to content

Commit 772695b

Browse files
fix(client): send all configured auth headers (#106)
1 parent 404e013 commit 772695b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/codex/_client.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,7 @@ def qs(self) -> Querystring:
154154
@property
155155
@override
156156
def auth_headers(self) -> dict[str, str]:
157-
if self._authenticated_api_key:
158-
return self._authenticated_api_key
159-
if self._public_access_key:
160-
return self._public_access_key
161-
return {}
157+
return {**self._authenticated_api_key, **self._public_access_key}
162158

163159
@property
164160
def _authenticated_api_key(self) -> dict[str, str]:
@@ -386,11 +382,7 @@ def qs(self) -> Querystring:
386382
@property
387383
@override
388384
def auth_headers(self) -> dict[str, str]:
389-
if self._authenticated_api_key:
390-
return self._authenticated_api_key
391-
if self._public_access_key:
392-
return self._public_access_key
393-
return {}
385+
return {**self._authenticated_api_key, **self._public_access_key}
394386

395387
@property
396388
def _authenticated_api_key(self) -> dict[str, str]:

0 commit comments

Comments
 (0)