From 83137ea0efc082a446e88d568dbf57846de467b8 Mon Sep 17 00:00:00 2001 From: Muluhabt Date: Tue, 28 Jul 2026 13:37:10 +0300 Subject: [PATCH] Fixing cors issue in produciton --- apps/edr-freight-api/src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/edr-freight-api/src/main.ts b/apps/edr-freight-api/src/main.ts index 5b027448c..e2783e4ed 100644 --- a/apps/edr-freight-api/src/main.ts +++ b/apps/edr-freight-api/src/main.ts @@ -40,6 +40,13 @@ async function bootstrap() { "x-delegator-position-id", "x-current-project-id", "x-current-position-id", + // Headers sent by the freight-backoffice OKR/objective-service client + // (withHeaders.tsx, signatureAndTeeterService.ts, useIncomingReport.ts) + // under yet another naming convention — unprefixed "tenant-key"/"unit-id", + // and "x-delegated-position-id" (delegated, not delegator). + "tenant-key", + "unit-id", + "x-delegated-position-id", ], exposedHeaders: ["Content-Disposition"], maxAge: 86400, // cache preflight for 24h to cut chatter in dev