修复CPU占用问题,添加servers.JOIN,LEAVE,LIST包
This commit is contained in:
@ -2,12 +2,19 @@ package router
|
||||
|
||||
import (
|
||||
"coreapp/router/minecraft"
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Route(server *gin.Engine) {
|
||||
server.Use(cors.New(cors.Config{
|
||||
AllowAllOrigins: true,
|
||||
AllowCredentials: true,
|
||||
AllowMethods: []string{"*"},
|
||||
ExposeHeaders: []string{"*"},
|
||||
AllowHeaders: []string{"*"},
|
||||
}))
|
||||
rootGroup := server.Group("/")
|
||||
|
||||
minecraftGroup := rootGroup.Group("/minecraft")
|
||||
{
|
||||
servers := minecraftGroup.Group("/servers")
|
||||
|
Reference in New Issue
Block a user