This commit is contained in:
richboo111
2023-04-25 11:06:04 +08:00
parent 296693a2ce
commit 1199fadedd

View File

@@ -36,8 +36,8 @@ func Init() {
func StartWebSocket(w http.ResponseWriter, r *http.Request) {
conn, err := (&websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
ReadBufferSize: 8182,
WriteBufferSize: 8182,
// 允许所有CORS跨域请求
CheckOrigin: func(r *http.Request) bool {
return true