From cf5183cd14ce21e45d4bfd18c8668e6993670ffa Mon Sep 17 00:00:00 2001 From: John Sell Date: Thu, 23 Apr 2026 16:42:47 -0400 Subject: [PATCH] fix(deploy): add KARTOGRAPH_CORS_ORIGINS env var to API deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ConfigMap had the CORS origins but the API deployment never read the key — it was missing from the container's env spec. OPTIONS preflight requests returned 405 because the CORS middleware was never initialized. Marked optional so local/dev deployments without CORS config still work (CORS disabled by default when origins list is empty). Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy/apps/kartograph/base/api-deployment.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy/apps/kartograph/base/api-deployment.yaml b/deploy/apps/kartograph/base/api-deployment.yaml index b213df637..ec6906f9f 100644 --- a/deploy/apps/kartograph/base/api-deployment.yaml +++ b/deploy/apps/kartograph/base/api-deployment.yaml @@ -115,6 +115,13 @@ spec: key: SPICEDB_USE_TLS - name: SPICEDB_CERT_PATH value: /etc/spicedb-ca/service-ca.crt + # CORS config + - name: KARTOGRAPH_CORS_ORIGINS + valueFrom: + configMapKeyRef: + name: kartograph-config + key: KARTOGRAPH_CORS_ORIGINS + optional: true # Outbox worker config - name: KARTOGRAPH_OUTBOX_ENABLED valueFrom: