fix(antigravity-auth): apply auth headers in pass-through path

Pass-through path (non-string body) now preserves Authorization header.
This ensures authentication works even when request transformation is bypassed.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-12 23:26:53 +09:00
parent d450c4f966
commit 16393b2554

View File

@@ -318,8 +318,12 @@ export function createAntigravityFetch(
) )
if (response === "pass-through") { if (response === "pass-through") {
debugLog("Non-string body detected, passing through to original fetch") debugLog("Non-string body detected, passing through with auth headers")
return fetch(url, init) const headersWithAuth = {
...init.headers,
Authorization: `Bearer ${cachedTokens.access_token}`,
}
return fetch(url, { ...init, headers: headersWithAuth })
} }
if (response) { if (response) {