add per message deflate to signal ws (#3174)

This commit is contained in:
Paul Wells
2024-11-14 00:35:30 -08:00
committed by GitHub
parent cc22306047
commit 9e4dae7107
+8 -5
View File
@@ -69,7 +69,6 @@ func NewRTCService(
router: router,
roomAllocator: ra,
store: store,
upgrader: websocket.Upgrader{},
currentNode: currentNode,
config: conf,
isDev: conf.Development,
@@ -79,10 +78,14 @@ func NewRTCService(
connections: map[*websocket.Conn]struct{}{},
}
// allow connections from any origin, since script may be hosted anywhere
// security is enforced by access tokens
s.upgrader.CheckOrigin = func(r *http.Request) bool {
return true
s.upgrader = websocket.Upgrader{
EnableCompression: true,
// allow connections from any origin, since script may be hosted anywhere
// security is enforced by access tokens
CheckOrigin: func(r *http.Request) bool {
return true
},
}
return s