add per message deflate to signal ws (#3174)
This commit is contained in:
@@ -69,7 +69,6 @@ func NewRTCService(
|
|||||||
router: router,
|
router: router,
|
||||||
roomAllocator: ra,
|
roomAllocator: ra,
|
||||||
store: store,
|
store: store,
|
||||||
upgrader: websocket.Upgrader{},
|
|
||||||
currentNode: currentNode,
|
currentNode: currentNode,
|
||||||
config: conf,
|
config: conf,
|
||||||
isDev: conf.Development,
|
isDev: conf.Development,
|
||||||
@@ -79,10 +78,14 @@ func NewRTCService(
|
|||||||
connections: map[*websocket.Conn]struct{}{},
|
connections: map[*websocket.Conn]struct{}{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.upgrader = websocket.Upgrader{
|
||||||
|
EnableCompression: true,
|
||||||
|
|
||||||
// allow connections from any origin, since script may be hosted anywhere
|
// allow connections from any origin, since script may be hosted anywhere
|
||||||
// security is enforced by access tokens
|
// security is enforced by access tokens
|
||||||
s.upgrader.CheckOrigin = func(r *http.Request) bool {
|
CheckOrigin: func(r *http.Request) bool {
|
||||||
return true
|
return true
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|||||||
Reference in New Issue
Block a user