search the right resource

This commit is contained in:
Owen
2026-08-12 17:52:39 -04:00
parent 02ab24d01e
commit 5fbb205044
5 changed files with 170 additions and 63 deletions
+6 -2
View File
@@ -33,7 +33,10 @@ import {
type RequestUser
} from "@server/routers/aiGateway/pipeline";
import { streamAiGatewayResponse } from "@server/routers/aiGateway/streamAiGatewayResponse";
import { AI_GATEWAY_TRUST_HEADER } from "@server/lib/aiGatewayTrust";
import {
AI_GATEWAY_TRUST_HEADER,
AI_GATEWAY_RESOURCE_TYPE_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
@@ -64,7 +67,8 @@ const SKIP_HEADERS = new Set([
"upgrade",
"content-length",
"accept-encoding",
AI_GATEWAY_TRUST_HEADER.toLowerCase()
AI_GATEWAY_TRUST_HEADER.toLowerCase(),
AI_GATEWAY_RESOURCE_TYPE_HEADER.toLowerCase()
]);
type ResolvedProviderTarget = {