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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user