diff --git a/src/middleware.ts b/src/middleware.ts index 050b446..b1d7ee1 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -16,7 +16,6 @@ export async function apiKeyMiddleware(req: Request, res: ExpressResponse, next: const host = req.headers.origin; const validOrigin = host && ALLOWED_ORIGINS.includes(host); const key = req.get("Authorization"); - console.log(req); const apiKey = key ? await getAPIKey(key) : null; const apiKeyExists = apiKey !== null; console.log(`key is null: ${key === null}`); diff --git a/tests/utils.ts b/tests/utils.ts index 66fc7f5..ab56002 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -14,6 +14,7 @@ import { createConnection, Connection } from "mysql2/promise"; import { hashAPIKey } from "../src/authorization"; export function authorize(request: Test): Test { + console.log(process.env.CDS_API_KEY?.length); return request.set({ Authorization: process.env.CDS_API_KEY }); }