恢复SSL自动验证并修正证书域名
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-02 13:54:35 +08:00
1 parent 14bd6d162d
commit 14b6b97221
5 files changed
+54 -9

No files matched your search

+9 -5
View File
@@ -123,7 +123,8 @@ export function usePage() {
records.some((record) => record.type === 'AAAA')
))
const sslRuntime = ref({})
const port = ref(80)
const sslRuntime = ref({})
const addDomain = () => {
domainSettings.multi_domain.push([])
@@ -352,12 +353,14 @@ export function usePage() {
sslSettings.type = res.data.type
if (sslSettings.type === "2") {
sslSettings.type = "0"
sslSettings.challenge = "dns"
}
if (sslSettings.type === "0") {
sslSettings.challenge = ""
sslSettings.challenge = sslSettings.challenge || "http"
}
sslRuntime.value = res.data || {}
return res
port.value = res.data?.port || res.data?.httpPort || 80
return res
}).catch((error) => {
showSetupError(error)
return null
@@ -368,7 +371,7 @@ export function usePage() {
fullscreenLoading.value = true;
let sslType = sslSettings.type;
if (sslType === "0") {
if (sslType === "0" && sslSettings.challenge === "dns") {
sslType = "2"
}
@@ -718,9 +721,10 @@ export function usePage() {
fullscreenLoading,
dnsChecking,
dnsChallengeNotice,
port,
dnsInfos,
hasDNSIPv6,
addDomain,
addDomain,
setPassword,
getPassword,
getDbConfig,
+8 -1
View File
@@ -278,6 +278,11 @@
<div class="desc">
<div class="ssl-title-row">
<h2>{{ lang.setSSL }}</h2>
<div v-if="sslSettings.type === '0' && sslSettings.challenge === 'http' && port !== 80"
class="ssl-port-warning" role="alert">
<strong>{{ lang.warning }}</strong>
<span>{{ lang.autoSSLWarn }}</span>
</div>
</div>
<div class="ssl-title-description">{{ lang.setSSL }}</div>
</div>
@@ -293,8 +298,9 @@
<el-form-item :label="lang.ssl_challenge_type" v-if="sslSettings.type === '0'">
<div class="ssl-challenge-select-row">
<el-select class="ssl-type-select" :placeholder="lang.ssl_auto_dns" v-model="sslSettings.challenge"
<el-select class="ssl-type-select" :placeholder="lang.ssl_challenge_type" v-model="sslSettings.challenge"
:disabled="fullscreenLoading" @change="handleSSLChallengeChange">
<el-option :label="lang.ssl_auto_http" value="http"/>
<el-option :label="lang.ssl_auto_dns" value="dns"/>
</el-select>
@@ -406,6 +412,7 @@ const {
hasDNSIPv6,
sslSettings,
dnsChecking,
port,
dnsChallengeNotice,
waitDesc,
next,