From f10a0d53935ba9a1af2e17c6f0194114f87a1526 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 9 Aug 2026 12:27:47 -0400 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20forward=20the=20websocket=20upgra?= =?UTF-8?q?de=20to=20mempool=20=E2=80=94=20the=20UI=20is=20ws-driven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dashboard's /app/mempool/ proxy forwarded plain HTTP only: no Upgrade/Connection headers, so the browser's /api/v1/ws handshake reached mempool-api as a bare GET and Express 404'd it. The mempool page loaded fine and every REST probe was green while the user saw a UI that never connects — the backend was fully healthy and completely unreachable in the only way that matters to the page. This hid behind the electrumx initial-sync outage: once sync finished and the API answered, "mempool works" was declared from REST checks while the websocket path stayed dead. Reported by the operator from the browser, which is the only place it was visible. Adds Upgrade/$http_upgrade + Connection "upgrade" to the /app/mempool/ location in both shipped sources (image-recipe snippet + scripts copy). Live-verified on the dev node: ws through the proxy now answers 101; the control probe without upgrade headers reproduces the 404 signature. Co-Authored-By: Claude Fable 5 --- .../configs/snippets/archipelago-https-app-proxies.conf | 6 ++++++ scripts/nginx-https-app-proxies.conf | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/image-recipe/configs/snippets/archipelago-https-app-proxies.conf b/image-recipe/configs/snippets/archipelago-https-app-proxies.conf index 7ded1871..83f86cac 100644 --- a/image-recipe/configs/snippets/archipelago-https-app-proxies.conf +++ b/image-recipe/configs/snippets/archipelago-https-app-proxies.conf @@ -148,6 +148,12 @@ location /app/photoprism/ { location /app/mempool/ { proxy_pass http://127.0.0.1:4080/; proxy_http_version 1.1; + # mempool's UI is websocket-driven (/api/v1/ws). Without forwarding the + # upgrade, the page loads but never connects — the backend can be fully + # healthy and every REST probe green while the user sees a dead UI + # (2026-08-09). 101 through this proxy is the only honest health signal. + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/scripts/nginx-https-app-proxies.conf b/scripts/nginx-https-app-proxies.conf index 3a872304..75419786 100644 --- a/scripts/nginx-https-app-proxies.conf +++ b/scripts/nginx-https-app-proxies.conf @@ -112,6 +112,12 @@ location /app/photoprism/ { location /app/mempool/ { proxy_pass http://127.0.0.1:4080/; proxy_http_version 1.1; + # mempool's UI is websocket-driven (/api/v1/ws). Without forwarding the + # upgrade, the page loads but never connects — the backend can be fully + # healthy and every REST probe green while the user sees a dead UI + # (2026-08-09). 101 through this proxy is the only honest health signal. + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;