From 6b3017876633090f2360277a47c9c4772d81ca17 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Sun, 12 Apr 2026 09:02:42 -0400 Subject: [PATCH] fix(server): respect externally set PAPERCLIP_API_URL env var Previously the server unconditionally overwrote PAPERCLIP_API_URL on startup, clobbering any value set externally (e.g., via Kubernetes ConfigMap). Now only sets the default if the env var is not already set. Co-Authored-By: Claude Opus 4.6 --- server/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/index.ts b/server/src/index.ts index 955aaa16..cabc20b3 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -553,7 +553,9 @@ export async function startServer(): Promise { : runtimeListenHost; process.env.PAPERCLIP_LISTEN_HOST = runtimeListenHost; process.env.PAPERCLIP_LISTEN_PORT = String(listenPort); - process.env.PAPERCLIP_API_URL = `http://${runtimeApiHost}:${listenPort}`; + if (!process.env.PAPERCLIP_API_URL) { + process.env.PAPERCLIP_API_URL = `http://${runtimeApiHost}:${listenPort}`; + } setupLiveEventsWebSocketServer(server, db as any, { deploymentMode: config.deploymentMode,