Skip to content

Commit fb167c4

Browse files
babo989sonnyp
andauthored
caddy: alias /dashboard to the real Node-RED dashboard path (#976)
--------- Co-authored-by: Sonny Piers <sonny@fairscope.com>
1 parent 44da5da commit fb167c4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

os/caddy/Caddyfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@
7272
}
7373
}
7474

75+
# alias /dashboard -> real Node-RED dashboard path
76+
# FlowFuse Dashboard 2 reload-after-disconnect bug: when the WebSocket
77+
# drops (laptop sleep, planktoscope reboot, etc.) the bundled JS calls
78+
# new URL(window.location.origin + "/dashboard") to refresh, ignoring
79+
# the actual httpNodeRoot. Without this alias the reload URL becomes
80+
# /dashboard?reloadTime=... and falls through to the SPA 404 page.
81+
# see https://github.com/FlowFuse/node-red-dashboard/issues/2149
82+
redir /dashboard /ps/node-red-v2/dashboard/ 302
83+
redir /dashboard/ /ps/node-red-v2/dashboard/ 302
84+
7585
# Frontend fallback (everything else)
7686
handle {
7787
root * /opt/PlanktoScope/frontend/dist

0 commit comments

Comments
 (0)