Conversation
…h --insecure The dashboard Chat tab uses WebSocket endpoints (/api/pty, /api/ws, /api/pub, /api/events) that were restricted to localhost only. This prevented the Chat TUI from working when the dashboard is bound to a VPN/Tailscale interface with --insecure. Changes: - Add _ALLOW_PUBLIC global to track --insecure flag - Check _ALLOW_PUBLIC in all 4 WebSocket endpoints before rejecting non-loopback connections - Respect the same security model as HTTP: if user explicitly uses --insecure, WebSocket should follow
Contributor
Contributor
|
Likely duplicate of #17887 — same root cause: WebSocket endpoints don't check --insecure flag for non-loopback connections. |
Contributor
Author
|
Closing as duplicate of #17887. Thanks for the heads up! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The dashboard Chat tab uses WebSocket endpoints (/api/pty, /api/ws, /api/pub, /api/events) that were restricted to localhost only. This prevented the Chat TUI from working when the dashboard is bound to a VPN/Tailscale interface with
--insecure.Solution
_ALLOW_PUBLICglobal to track--insecureflag_ALLOW_PUBLICin all 4 WebSocket endpoints before rejecting non-loopback connections--insecure, WebSocket should followTesting
Tested with dashboard bound to Tailscale interface (100.x.x.x) using
--insecure --tuiflags. Chat TUI now connects and remains stable over WebSocket.Security Note
This change respects the existing
--insecuresecurity model. When--insecureis not used, WebSocket connections remain restricted to localhost.