mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 05:01:03 +03:00
refactor(console): stop stripping legacy Zen headers in proxy (#55120)
This commit is contained in:
committed by
GitHub
Unverified
parent
1015cb67d0
commit
82833dac90
@@ -37,17 +37,7 @@ export async function proxyInference(request: Request) {
|
||||
destination.hash = ""
|
||||
|
||||
const forwarded = new Request(destination, request)
|
||||
for (const name of [
|
||||
"x-zen",
|
||||
"x-zen-model",
|
||||
"x-zen-ip",
|
||||
"x-real-ip",
|
||||
"cf-access-client-id",
|
||||
"cf-access-client-secret",
|
||||
"host",
|
||||
"content-length",
|
||||
])
|
||||
forwarded.headers.delete(name)
|
||||
for (const name of ["host", "content-length"]) forwarded.headers.delete(name)
|
||||
// Keyless requests must reach new inference without credentials; `public` is not an API key there.
|
||||
const anonymous = !key || key === "public"
|
||||
if (anonymous) for (const name of ["authorization", "x-api-key", "x-goog-api-key"]) forwarded.headers.delete(name)
|
||||
|
||||
Reference in New Issue
Block a user