We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57c6de6 commit 98e5177Copy full SHA for 98e5177
1 file changed
internal/api/handlers/terminal.go
@@ -16,13 +16,7 @@ import (
16
17
var terminalUpgrader = websocket.Upgrader{
18
CheckOrigin: func(r *http.Request) bool {
19
- origin := r.Header.Get("Origin")
20
- if origin == "" {
21
- return true // Allow non-browser clients (curl, etc.)
22
- }
23
- // Allow same-origin requests: the Origin host must match the request Host
24
- host := r.Host
25
- return strings.HasPrefix(origin, "http://"+host) || strings.HasPrefix(origin, "https://"+host)
+ return true // Allow all origins (matches CORS AllowAllOrigins: true)
26
},
27
ReadBufferSize: 4096,
28
WriteBufferSize: 4096,
0 commit comments