diff --git a/src/app.ts b/src/app.ts index 6ccdfd6..62a27de 100644 --- a/src/app.ts +++ b/src/app.ts @@ -56,16 +56,7 @@ app.use((req, res, next) => { // being present on OPTIONS. To improve reliability we also accept a // clientKey via query parameter and fall back to matching the origin // against the `whitelistcors` table below. - const clientKey = ( - req.header("x-tenant-key") || - req.header("X-TENANT-KEY") || - req.header("X-Tenant-Key") || - (req.query && (req.query.clientKey || req.query.client_key)) || - "" - ) - .toString() - .trim(); - const cacheKey = clientKey || "__default__"; + const cacheKey = "__default__"; (async () => { try { @@ -77,7 +68,7 @@ app.use((req, res, next) => { .filter(Boolean); const originCors = await db.whitelistcors.findFirst({ - where: { origin: origin, is_active: "Y" }, + where: { is_active: "Y" }, }); if (originCors) { allowedOrigins.push(originCors.origin);