Skip to content

Commit 66005cc

Browse files
修复在不存在配置时指定了 CNAME 不生效的问题
1 parent 94a5298 commit 66005cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pkg/core/domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (p *PageDomain) returnMeta(ctx context.Context, owner, repo, branch string,
8383
result.Owner = owner
8484
result.Repo = repo
8585
result.Path = strings.Join(path, "/")
86-
86+
// todo: 优化保存逻辑 ,减少写入
8787
if err = p.alias.Bind(ctx, meta.Alias, result.Owner, result.Repo, branch); err != nil {
8888
zap.L().Warn("alias binding error.", zap.Error(err))
8989
return nil, err

pkg/core/meta.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ func (s *ServerMeta) parsePageConfig(ctx context.Context, meta *PageMetaContent,
180180
"targets": alias,
181181
},
182182
})
183+
meta.Alias = alias
183184
}
184185
return nil // 配置文件不存在不是错误
185186
}

0 commit comments

Comments
 (0)