From 0580a55553b0e52545648962991538e96862dd89 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 7 Apr 2024 22:05:38 +0100 Subject: [PATCH] debugging --- src/access.ts | 6 ++++++ src/hooks.server.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/access.ts b/src/access.ts index 4c7592d..7c4b054 100644 --- a/src/access.ts +++ b/src/access.ts @@ -33,6 +33,12 @@ const generateValidator = jwt: string; payload: object; }> => { + // log all headers as a comma separated list of pairs + console.log( + Array.from(request.headers.entries()) + .map(([key, value]) => `${key}: ${value}`) + .join(", "), + ); const jwt = extractJWTFromRequest(request); const parts = jwt.split("."); diff --git a/src/hooks.server.ts b/src/hooks.server.ts index ac12a14..5dd5712 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -20,6 +20,7 @@ export const handle: Handle = async ({ event, resolve }) => { if (event.platform?.env.IS_LOCAL_MODE === "1") { return await handler({ event, resolve }); } else { + console.log("checking authentication"); return await onRequest({ request: event.request, pluginArgs: {