增加自定义绑定域名

This commit is contained in:
2026-09-02 15:11:32 +08:00
parent db519d9af2
commit f644c278c9
23 changed files with 2966 additions and 212 deletions
+5
View File
@@ -3,6 +3,7 @@ package routers
import (
"os"
"server/controllers"
"server/middleware"
"server/routers/api"
"server/routers/app"
@@ -35,6 +36,10 @@ func init() {
// 全局操作日志:请求开始采集并异步写入
beego.InsertFilter("*", beego.BeforeRouter, middleware.BeginOperationLog)
// Let's Encrypt HTTP-01 验证回访。
// 无条件注册:证书颁发机构何时来验证与 APP_MODE 无关,任何启动模式都必须能应答。
beego.Router("/.well-known/acme-challenge/:token", &controllers.AcmeChallengeController{}, "get:Serve")
// 根据运行模式选择要注册的路由组
// 优先读取环境变量 APP_MODE,其次读取配置 app_mode,默认 all
mode := os.Getenv("APP_MODE")