fix: 修改 CORS, 删除 开发代理

This commit is contained in:
2026-03-27 20:08:58 +08:00
parent 3e3fdaac26
commit bbd554a426
2 changed files with 4 additions and 4 deletions

View File

@@ -24,9 +24,9 @@ func SetupRouter() *gin.Engine {
}
r := gin.Default()
r.Use(cors.New(cors.Config{
AllowOrigins: []string{"*.kmux.cn"},
AllowOrigins: []string{"*.kmux.cn*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"},
AllowHeaders: []string{"X-Session-Id"},
AllowHeaders: []string{"*", "X-Session-Id"},
ExposeHeaders: []string{"Content-Length"},
AllowCredentials: true,
MaxAge: 12 * time.Hour,