From 14822676162c7d8a23bddd73e74b48969c56cc10 Mon Sep 17 00:00:00 2001 From: Jon Breen Date: Thu, 9 May 2024 21:04:43 +0100 Subject: [PATCH] add user-agent --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6a57757..08e8d62 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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"