Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
johtso committed Apr 7, 2024
1 parent cc5e7e0 commit 0580a55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(".");
Expand Down
1 change: 1 addition & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 0580a55

Please sign in to comment.