Skip to content

Commit

Permalink
add user-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpodcasts committed May 9, 2024
1 parent d1d938b commit 1482267
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ 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")!;
const authorisation: string = c.req.header("Authorization")!;
console.log(`Using auth header '${authorisation.slice(0, 20)}..'`);
const resp = await fetch(c.env.secureSubmitEndpoint, {
headers: {
'Accept': "*/*",
'Authorisation': authorisation,
"Content-type": "application/json",
"Cache-Control":"no-cache",
"Cache-Control": "no-cache",
"User-Agent": "PostmanRuntime/7.37.3"
},
body: JSON.stringify(data),
method: "POST"
Expand Down

0 comments on commit 1482267

Please sign in to comment.