fix(realtime): 修复ws 握手失败、计费问题

(cherry picked from commit 618dffc43fd5a5f4065944db87761f9ee18e44d3)
This commit is contained in:
Xyfacai authored and CalciumIon committed 2024-11-05 19:28:46 +08:00
1 parent 16f6bdc81e
commit 67bdfea903
4 files changed
+28 -10

No files matched your search

+1
View File
@@ -145,6 +145,7 @@ func Relay(c *gin.Context) {
}
var upgrader = websocket.Upgrader{
Subprotocols: []string{"realtime"}, // WS 握手支持的协议,如果有使用 Sec-WebSocket-Protocol,则必须在此声明对应的 Protocol TODO add other protocol
CheckOrigin: func(r *http.Request) bool {
return true // 允许跨域
},