feat(tenant): 选号网域名随部署自动登记为 dachui 租户域名

选号网 hfb_show 与主站共用后端,生产环境的 Unknown Host 保护会把未登记的 xh.hao858.com 以 site_not_found 拒绝,导致列表接口 404。

后端启动时读取 CADDY_SHOW_DOMAIN,把选号网域名登记为 dachui 的 showcase 租户域名;与主站/解忧域名重合时保留原类型。避免换库或重建后依赖人工补 SQL。
This commit is contained in:
yml
2026-11-24 12:58:04 +08:00
parent 44f883866c
commit b63f5d771b
6 changed files with 83 additions and 2 deletions
+1
View File
@@ -88,6 +88,7 @@ func main() {
if err := tenancy.BootstrapDomains(context.Background(), db, tenancy.BootstrapConfig{
PrimaryDomain: cfg.PrimaryDomain,
JieyouDomain: cfg.TenantJieyouDomain,
ShowDomain: cfg.ShowDomain,
}); err != nil {
logger.Fatal("经营租户域名初始化失败", zap.Error(err))
}