fix: set Claude sessionKey in cookie jar instead of raw header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
JesseMarkowitz
2026-02-28 05:33:04 -05:00
parent f500c038cb
commit 51c806c2c6
2 changed files with 26 additions and 2 deletions

View File

@@ -32,10 +32,10 @@ class ClaudeProvider(BaseProvider):
"Run 'python -m src.main auth' to configure it."
),
)
# Set cookie header; never log the key value
# Set sessionKey in the cookie jar (not as a raw header string)
self._session.cookies.set("sessionKey", key, domain="claude.ai", path="/")
self._session.headers.update(
{
"Cookie": f"sessionKey={key}",
"Referer": "https://claude.ai/",
"Origin": "https://claude.ai",
}