From b235ef9201661bd4969819830e862f9746a3e7e2 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Mar 2026 06:57:58 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20nginx=20route=20collision=20=E2=80=94=20n?= =?UTF-8?q?amespace=20lakehouse=20API=20under=20/lakehouse/api/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous regex routes for /catalog, /storage, /health intercepted main site. Now all lakehouse API calls go through /lakehouse/api/ prefix, stripped by nginx rewrite. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ui/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/ui/src/main.rs b/crates/ui/src/main.rs index 0dc57dd..be6236d 100644 --- a/crates/ui/src/main.rs +++ b/crates/ui/src/main.rs @@ -5,13 +5,12 @@ fn api_base() -> String { if let Some(window) = web_sys::window() { if let Ok(origin) = window.location().origin() { if origin.contains("localhost") || origin.contains("127.0.0.1") { - // Local dev: UI on :3300, gateway on :3100 if let Ok(hostname) = window.location().hostname() { return format!("http://{}:3100", hostname); } } - // Production: nginx proxies /catalog, /query, /ai, /storage on same origin - return origin; + // Production: API proxied under /lakehouse/api/ + return format!("{}/lakehouse/api", origin); } } "http://localhost:3100".to_string()