mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
gemini-cli (and any @google/genai-based client) sends its credential exclusively via x-goog-api-key and it is not client-configurable to use Authorization/x-api-key instead. Add it as an unconditional fallback, after Authorization: Bearer and x-api-key, before the path-scoped URL token, in both the real enforcement gate (src/server/authz/policies/clientApi.ts::extractBearer()) and the general extractor (src/sse/services/auth.ts::extractApiKey()). The header-read/trim logic is extracted into a new leaf module (src/sse/services/googApiKeyAuth.ts) shared by both call sites, so the frozen auth.ts file only takes the minimal chokepoint wiring (config/quality/file-size-baseline.json rebaselined 2458->2461 with justification, matching this repo's established extraction pattern). Closes #7034