// Package utils -----------------------------
// @file      : hertzWSUpgrade.go
// @author    : JJXu
// @contact   : wavingbear@163.com
// @time      : 2022/6/28 14:19
// -------------------------------------------
package ws

import (
	"github.com/gorilla/websocket"
	"net/http"
)

var UpGrader = websocket.Upgrader{
	ReadBufferSize:  1024,
	WriteBufferSize: 1024,
	CheckOrigin: func(r *http.Request) bool {
		// 检查请求的来源是否允许websocket连接，可根据需求自行实现
		return true
	},
}
