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
+8 -2
View File
@@ -24,6 +24,10 @@ import { resources, sites, Target, targets } from "@server/db";
import createPathRewriteMiddleware from "./middleware";
import { sanitize, encodePath, validatePathRewriteConfig } from "./utils";
import regionalCache from "@server/lib/cache";
import {
AI_GATEWAY_TRUST_HEADER,
getAiGatewayTrustToken
} from "@server/lib/aiGatewayTrust";
const redirectHttpsMiddlewareName = "redirect-to-https";
const badgerMiddlewareName = "badger";
@@ -808,7 +812,8 @@ export async function getTraefikConfig(
headers: {
customRequestHeaders: {
...(aiGatewayHost ? { Host: aiGatewayHost } : {}),
"p-host": fullDomain
"p-host": fullDomain,
[AI_GATEWAY_TRUST_HEADER]: getAiGatewayTrustToken()
}
}
};
@@ -911,7 +916,8 @@ export async function getTraefikConfig(
headers: {
customRequestHeaders: {
...(aiGatewayHost ? { Host: aiGatewayHost } : {}),
"p-host": fullDomain
"p-host": fullDomain,
[AI_GATEWAY_TRUST_HEADER]: getAiGatewayTrustToken()
}
}
};