From 8594711ce1ece493e7b94ef713cbaf4241a99e3d Mon Sep 17 00:00:00 2001 From: Jon Breen Date: Thu, 9 May 2024 14:48:30 +0100 Subject: [PATCH] log some of auth header --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 58b8477..adcafc8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -287,9 +287,11 @@ app.post("/submit", auth0Middleware, async (c) => { const data = await c.req.json(); if (auth0Payload?.permissions && auth0Payload.permissions.includes('submit')) { + const authorisation:string= c.req.header("Authorization")!; + console.log(`Using auth header '${authorisation.slice(0, 20)}..'`); const resp = await fetch(c.env.secureSubmitEndpoint, { headers: { - 'Authorization': c.req.header("Authorization")!, + 'authorisation': authorisation, "content-type": "application/json;charset=UTF-8", }, body: data,