add virtual api key validation in verifySession

This commit is contained in:
miloschwartz
2026-08-12 10:38:08 -04:00
parent ac3402a8b3
commit 49020fa6ea
29 changed files with 852 additions and 197 deletions
+3 -1
View File
@@ -33,6 +33,7 @@ import {
type RequestUser
} from "@server/routers/aiGateway/pipeline";
import { streamAiGatewayResponse } from "@server/routers/aiGateway/streamAiGatewayResponse";
import { AI_GATEWAY_TRUST_HEADER } from "@server/lib/aiGatewayTrust";
// Short TTL: long enough to spare the DB on a burst of requests, short
// enough that target/site changes (added, removed, exit node moved) show up
@@ -62,7 +63,8 @@ const SKIP_HEADERS = new Set([
"transfer-encoding",
"upgrade",
"content-length",
"accept-encoding"
"accept-encoding",
AI_GATEWAY_TRUST_HEADER.toLowerCase()
]);
type ResolvedProviderTarget = {