Skip to content

Commit

Permalink
log some of auth header
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpodcasts committed May 9, 2024
1 parent 1194a67 commit 8594711
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8594711

Please sign in to comment.