feat(server): 优化 Swagger 配置,支持动态 host

- 移除 swagger.json/yaml 中硬编码的 host 字段
- 在 docs.go 中将 Host 设置为空字符串以支持动态检测
- 添加前端 /swagger 代理配置,支持开发环境访问 Swagger UI
- 在 main.go 中导入 docs 包注册 Swagger 文档
This commit is contained in:
2026-07-15 13:30:59 +08:00
parent 8898437e9e
commit 1d799ac0e7
5 changed files with 6 additions and 4 deletions
-1
View File
@@ -20,7 +20,6 @@ definitions:
description: 响应消息
type: string
type: object
host: localhost:8080
info:
contact:
email: support@swagger.io