修复在不存在配置时指定了 CNAME 不生效的问题
This commit is contained in:
@@ -83,7 +83,7 @@ func (p *PageDomain) returnMeta(ctx context.Context, owner, repo, branch string,
|
|||||||
result.Owner = owner
|
result.Owner = owner
|
||||||
result.Repo = repo
|
result.Repo = repo
|
||||||
result.Path = strings.Join(path, "/")
|
result.Path = strings.Join(path, "/")
|
||||||
|
// todo: 优化保存逻辑 ,减少写入
|
||||||
if err = p.alias.Bind(ctx, meta.Alias, result.Owner, result.Repo, branch); err != nil {
|
if err = p.alias.Bind(ctx, meta.Alias, result.Owner, result.Repo, branch); err != nil {
|
||||||
zap.L().Warn("alias binding error.", zap.Error(err))
|
zap.L().Warn("alias binding error.", zap.Error(err))
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ func (s *ServerMeta) parsePageConfig(ctx context.Context, meta *PageMetaContent,
|
|||||||
"targets": alias,
|
"targets": alias,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
meta.Alias = alias
|
||||||
}
|
}
|
||||||
return nil // 配置文件不存在不是错误
|
return nil // 配置文件不存在不是错误
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user