From dd4ea4be95c733636f42ed8161f395c2217699f8 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 15 Feb 2024 16:44:19 +0000 Subject: [PATCH] Nothing to see here, carry on. --- .../server/src/utilities/workerRequests.ts | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/server/src/utilities/workerRequests.ts b/packages/server/src/utilities/workerRequests.ts index 054514ab59..91340c8d78 100644 --- a/packages/server/src/utilities/workerRequests.ts +++ b/packages/server/src/utilities/workerRequests.ts @@ -17,28 +17,6 @@ import { } from "@budibase/backend-core" import { Ctx, User, EmailInvite } from "@budibase/types" -function ensureHeadersIsObject(headers: HeadersInit | undefined): Headers { - if (headers instanceof Headers) { - return headers - } - - const headersObj = new Headers() - if (headers === undefined) { - return headersObj - } - - if (Array.isArray(headers)) { - for (const [key, value] of headers) { - headersObj.append(key, value) - } - } else { - for (const key in headers) { - headersObj.append(key, headers[key]) - } - } - return headersObj -} - interface Request { ctx?: Ctx method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" @@ -89,6 +67,7 @@ export function createRequest(request: Request): RequestInit { } logging.correlation.setHeader(headers) + requestInit.headers = headers return requestInit }