fix(executor): improve antigravity reverse proxy emulation

- force http/1.1 instead of http/2

- explicit connection close

- strip proxy headers X-Forwarded-For and X-Real-IP

- add project id to fetch models payload
This commit is contained in:
maplelove
2026-02-22 18:41:58 +08:00
parent dd71c73a9f
commit c8d809131b
2 changed files with 56 additions and 17 deletions

View File

@@ -73,6 +73,10 @@ func createReverseProxy(upstreamURL string, secretSource SecretSource) (*httputi
req.Header.Del("Authorization")
req.Header.Del("X-Api-Key")
req.Header.Del("X-Goog-Api-Key")
// Remove proxy tracing headers to avoid upstream detection
req.Header.Del("X-Forwarded-For")
req.Header.Del("X-Real-IP")
// Remove query-based credentials if they match the authenticated client API key.
// This prevents leaking client auth material to the Amp upstream while avoiding