Skip to content

Commit 75b8fd4

Browse files
committed
Add comment on origin patterns
1 parent 77d943f commit 75b8fd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

coderd/workspaceapps/proxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ func (s *Server) workspaceAgentPTY(rw http.ResponseWriter, r *http.Request) {
616616

617617
conn, err := websocket.Accept(rw, r, &websocket.AcceptOptions{
618618
CompressionMode: websocket.CompressionDisabled,
619+
// Always allow websockets from the primary dashboard URL.
620+
// Terminals are opened there and connect to the proxy.
619621
OriginPatterns: []string{
620622
s.DashboardURL.Host,
621623
s.AccessURL.Host,

0 commit comments

Comments
 (0)