From 48c7c1c5e6d7bbf3349615827f0c086cb39bf84f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Apr 2026 13:04:24 -0500 Subject: [PATCH] Fix dashboard: detect /lakehouse/ nginx prefix for API calls dashboard.ts now checks if running behind the nginx proxy (path starts with /lakehouse) and prepends the prefix to all API calls. Without this, the browser called /sql instead of /lakehouse/sql and got 404s from the LLM Team Flask app. Co-Authored-By: Claude Opus 4.6 (1M context) --- mcp-server/dashboard.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcp-server/dashboard.ts b/mcp-server/dashboard.ts index 8947267..cc8d005 100644 --- a/mcp-server/dashboard.ts +++ b/mcp-server/dashboard.ts @@ -1,4 +1,6 @@ -const GW = window.location.origin; +// Detect if we're behind nginx (/lakehouse/ prefix) or direct (:3700) +const base = window.location.pathname.startsWith("/lakehouse") ? "/lakehouse" : ""; +const GW = window.location.origin + base; let simData: any = null; let currentDay = 0;