diff --git a/src/middleware.ts b/src/middleware.ts index 001f80e..62849b3 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -17,6 +17,9 @@ export async function apiKeyMiddleware(req: Request, res: ExpressResponse, next: const key = req.get("Authorization"); const apiKey = key ? await getAPIKey(key) : null; const apiKeyExists = apiKey !== null; + console.log(`key is null: ${key === null}`); + console.log(`key is undefined: ${key === undefined}`); + console.log(`API key exists: ${apiKeyExists}`); if (validOrigin || (apiKeyExists && hasPermission(apiKey, req))) { next(); } else {