feat(meshchat): fix WebSocket connection handling and expand public path checks for static assets
Some checks failed
CI / lint (push) Failing after 4m52s
CI / build-frontend (push) Successful in 9m30s

This commit is contained in:
2026-01-02 11:26:24 -06:00
parent b8de232790
commit 7255170c86

View File

@@ -1651,12 +1651,26 @@ class ReticulumMeshChat:
# check if path is public
is_public = any(path.startswith(public) for public in public_paths)
# Allow WebSocket connections without auth if it's the handshake/upgrade request
# Real auth for WS happens inside the connection if needed, or by cookie
if path == "/ws":
return await handler(request)
# check if requesting setup page (index.html will show setup if needed)
if (
path == "/"
or path.startswith("/assets/")
or path.startswith("/favicons/")
or path.endswith(".js")
or path.endswith(".css")
or path.endswith(".json")
or path.endswith(".wasm")
or path.endswith(".png")
or path.endswith(".jpg")
or path.endswith(".jpeg")
or path.endswith(".ico")
or path.endswith(".svg")
):
is_public = True