保存统一Web域名恢复入口接手基线

This commit is contained in:
xuans committed 2026-09-16 19:17:55 +08:00
1 parent ec0c53365a
commit e41fa43412
18 files changed
+129 -90

No files matched your search

-5
View File
@@ -90,15 +90,10 @@ export function readDevelopmentRuntime(root = runtimeRoot, { previous = false }
if (typeof webDomain !== 'string' || !/^[a-z0-9.-]+(?::\d+)?$/i.test(webDomain)) {
throw new Error('请先在 yunx-test/config/config.json 配置有效的 Web 域名')
}
const mailDomain = config.domains?.primary || webDomain
if (typeof mailDomain !== 'string' || !/^[a-z0-9.-]+(?::\d+)?$/i.test(mailDomain)) {
throw new Error('请先在 yunx-test/config/config.json 配置有效的主邮件域名')
}
const certificatePath = resolveDevelopmentCertificate(root, previous ? ssl.tls?.previousCertificateRef : ssl.tls?.certificateRef)
const privateKeyPath = resolveDevelopmentCertificate(root, previous ? ssl.tls?.previousPrivateKeyRef : ssl.tls?.privateKeyRef, true)
return {
origin: `https://${webDomain}`,
mailOrigin: `https://${mailDomain}`,
certificatePath,
privateKeyPath,
generation: config.generation