From 449bdbe449a0fbded7f465613696aba7f5aba55f Mon Sep 17 00:00:00 2001 From: fhs52267 Date: Sun, 22 Mar 2026 15:15:36 +0100 Subject: [PATCH] Update web ui settings --- meshmonitor/run.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/meshmonitor/run.sh b/meshmonitor/run.sh index 0bc909a..4063c4e 100644 --- a/meshmonitor/run.sh +++ b/meshmonitor/run.sh @@ -10,19 +10,22 @@ export MESHTASTIC_TCP_PORT=$(jq --raw-output '.meshtastic_tcp_port // 4403' $CON export PORT=3001 export NODE_ENV=production -# --- MANDATORY FOR INGRESS --- -# This tells the React app to use relative paths for JS/CSS -export BASE_URL="./" +# --- INGRESS SPECIFIC FIXES --- +# 1. Force the app to use relative paths for all assets +export BASE_URL="./" -# Allow Home Assistant to proxy the connection +# 2. Tell the Express server to trust the HA Proxy headers export TRUST_PROXY=true -export ALLOWED_ORIGINS="*" -# Optional: Disable secure cookies if you aren't using HTTPS internally +# 3. Disable Secure Cookies (Ingress often fails if this is 'true' without valid SSL on the local IP) export COOKIE_SECURE=false -# ----------------------------- -echo "Starting MeshMonitor with Ingress support..." +# 4. MeshMonitor specific: Allow the HA Ingress origin +export ALLOWED_ORIGINS="*" +# ------------------------------ + +echo "Starting MeshMonitor on port 3001 via Ingress..." cd /app +# Start the server using the compiled distribution exec node dist/server/server.js \ No newline at end of file