feat: hot reload

This commit is contained in:
2025-12-17 09:32:05 +08:00
parent e8b2699104
commit f2b53967eb
7 changed files with 95 additions and 32 deletions

View File

@@ -22,6 +22,31 @@ Port = 8080
# Host = "0.0.0.0"
# 全局路由前缀(可选)
# BaseURI = "/api/v1"
[Http.Cors]
# dev CORS for Vite dev servers
Mode = "dev"
[[Http.Cors.Whitelist]]
AllowOrigin = "http://localhost:5173"
AllowHeaders = "Content-Type,Authorization"
AllowMethods = "GET,POST,PUT,PATCH,DELETE,OPTIONS"
ExposeHeaders = "*"
AllowCredentials = true
[[Http.Cors.Whitelist]]
AllowOrigin = "http://localhost:5174"
AllowHeaders = "Content-Type,Authorization"
AllowMethods = "GET,POST,PUT,PATCH,DELETE,OPTIONS"
ExposeHeaders = "*"
AllowCredentials = true
[[Http.Cors.Whitelist]]
AllowOrigin = "http://localhost:5175"
AllowHeaders = "Content-Type,Authorization"
AllowMethods = "GET,POST,PUT,PATCH,DELETE,OPTIONS"
ExposeHeaders = "*"
AllowCredentials = true
# =========================
# 数据库配置
# =========================