Skip to content

Commit 17d6216

Browse files
committed
fix: maybe error when enable TLS #230
close #230
1 parent d1cbc72 commit 17d6216

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

app/src/views/domain/DomainEdit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const save = async () => {
141141
}
142142
}
143143
144-
await domain.save(name.value, {
144+
return domain.save(name.value, {
145145
name: filename.value || name.value,
146146
content: configText.value,
147147
overwrite: true,

app/src/views/domain/cert/components/ObtainCert.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { useGettext } from 'vue3-gettext'
33
import { Modal, message } from 'ant-design-vue'
44
import type { ComputedRef, Ref } from 'vue'
5-
import template from '@/api/template'
65
import domain from '@/api/domain'
76
import AutoCertStepOne from '@/views/domain/cert/components/AutoCertStepOne.vue'
87
import type { NgxConfig, NgxDirective } from '@/api/ngx'
@@ -82,19 +81,7 @@ function change_auto_cert(status: boolean) {
8281
8382
async function onchange(status: boolean) {
8483
if (status) {
85-
await template.get_block('letsencrypt.conf').then(r => {
86-
ngx_config.servers.forEach(async v => {
87-
v.locations = v?.locations?.filter(l => l.path !== '/.well-known/acme-challenge')
88-
89-
v.locations?.push(...r.locations)
90-
})
91-
}).then(async () => {
92-
// if ssl_certificate is empty, do not save, just use the config from last step.
93-
if (directivesMap.value.ssl_certificate?.[0])
94-
await save_site_config()
95-
96-
job()
97-
})
84+
job()
9885
}
9986
else {
10087
ngx_config.servers.forEach(v => {

app/src/views/domain/ngx_conf/LogEntry.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { NgxConfig } from '@/api/ngx'
88
const props = defineProps<{
99
ngxConfig: NgxConfig
1010
currentServerIdx: number
11-
name: string
11+
name?: string
1212
}>()
1313
1414
const { $gettext } = useGettext()

0 commit comments

Comments
 (0)