fix(desktop): WS live feed offline — native plugin sends no Origin header
Login worked after the mixed-content fix, but the live feed 403'd silently: tauri-plugin-websocket's connect() runs on Tauri's Rust side, not inside the webview page, so it never auto-attaches Origin the way a browser WebSocket would — routes/ws.ts's anti-CSWSH check rejects a missing Origin before auth. platform-ws.ts now sets Origin: tauri://localhost explicitly. Also fixes a second, independent gap the above alone wouldn't have caught: komodo/resources.toml's booth Stacks had WS_ALLOWED_ORIGINS= empty in production despite .env.example documenting it as required for desktop. Needs a Komodo sync + redeploy to reach a live booth.
This commit is contained in:
@@ -52,7 +52,10 @@ REGISTRY=git.infra.msai.al/mca/parking_solution
|
||||
TAG=stage-28bd838
|
||||
COOKIE_SECURE=0
|
||||
VISION_ENABLED=1
|
||||
WS_ALLOWED_ORIGINS=
|
||||
# Desktop app WS handshake: Origin is tauri://localhost (set explicitly by
|
||||
# platform-ws.ts, since the native WS plugin has no page context to auto-attach
|
||||
# one). Linux may also send http://tauri.localhost. See routes/ws.ts anti-CSWSH check.
|
||||
WS_ALLOWED_ORIGINS=tauri://localhost,http://tauri.localhost
|
||||
JWT_SECRET=[[park_buzi_jwt_secret]]
|
||||
EVENT_SIGNING_KEY=[[park_buzi_event_signing_key]]
|
||||
BACKUP_KEY=[[park_buzi_backup_key]]
|
||||
@@ -82,7 +85,10 @@ REGISTRY=git.infra.msai.al/mca/parking_solution
|
||||
TAG=stage-28bd838
|
||||
COOKIE_SECURE=0
|
||||
VISION_ENABLED=1
|
||||
WS_ALLOWED_ORIGINS=
|
||||
# Desktop app WS handshake: Origin is tauri://localhost (set explicitly by
|
||||
# platform-ws.ts, since the native WS plugin has no page context to auto-attach
|
||||
# one). Linux may also send http://tauri.localhost. See routes/ws.ts anti-CSWSH check.
|
||||
WS_ALLOWED_ORIGINS=tauri://localhost,http://tauri.localhost
|
||||
JWT_SECRET=[[park_2_jwt_secret]]
|
||||
EVENT_SIGNING_KEY=[[park_2_event_signing_key]]
|
||||
BACKUP_KEY=[[park_2_backup_key]]
|
||||
|
||||
Reference in New Issue
Block a user