chore: update ws security

This commit is contained in:
duorameng
2026-04-27 10:54:00 +08:00
parent f186697116
commit cf9acf3ea0
6 changed files with 162 additions and 8 deletions
+4 -1
View File
@@ -2,6 +2,7 @@ package router
import (
"strings"
"os"
"github.com/engigu/baihu-panel/internal/controllers"
"github.com/engigu/baihu-panel/internal/middleware"
@@ -31,7 +32,9 @@ type Controllers struct {
}
func Setup(c *Controllers) *gin.Engine {
gin.SetMode(gin.ReleaseMode)
if os.Getenv("GIN_MODE") == "" {
gin.SetMode(gin.ReleaseMode)
}
router := gin.New()
router.Use(middleware.GinLogger(), middleware.GinRecovery())