im
This commit is contained in:
@@ -36,8 +36,8 @@ func Init() {
|
|||||||
func StartWebSocket(w http.ResponseWriter, r *http.Request) {
|
func StartWebSocket(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
conn, err := (&websocket.Upgrader{
|
conn, err := (&websocket.Upgrader{
|
||||||
ReadBufferSize: 1024,
|
ReadBufferSize: 8182,
|
||||||
WriteBufferSize: 1024,
|
WriteBufferSize: 8182,
|
||||||
// 允许所有CORS跨域请求
|
// 允许所有CORS跨域请求
|
||||||
CheckOrigin: func(r *http.Request) bool {
|
CheckOrigin: func(r *http.Request) bool {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user