From 80b34f1aef8d10cf32ea31db70996205e268c680 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 17 Jun 2024 09:02:55 +0530 Subject: [PATCH] Reduce spurious logs for headers our clients send --- infra/workers/uploader/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/workers/uploader/src/index.ts b/infra/workers/uploader/src/index.ts index 3d413d4b3d..d94aeb048c 100644 --- a/infra/workers/uploader/src/index.ts +++ b/infra/workers/uploader/src/index.ts @@ -31,7 +31,7 @@ const handleOPTIONS = (request: Request) => { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "POST, PUT, OPTIONS", "Access-Control-Max-Age": "86400", - // "Access-Control-Allow-Headers": "UPLOAD-URL", + // "Access-Control-Allow-Headers": "Content-Type", "UPLOAD-URL, X-Client-Package", "Access-Control-Allow-Headers": "*", "Access-Control-Expose-Headers": "X-Request-Id, CF-Ray", }, @@ -58,7 +58,7 @@ const isAllowedOrigin = (origin: string | null) => { }; const areAllowedHeaders = (headers: string | null) => { - const allowed = ["UPLOAD-URL"]; + const allowed = ["Content-Type", "UPLOAD-URL", "X-Client-Package"]; if (!headers) return true; for (const header of headers.split(",")) {