diff --git a/src/nginxconfig/templates/domain_sections/https.vue b/src/nginxconfig/templates/domain_sections/https.vue index 2c35d7d..d5cbffe 100644 --- a/src/nginxconfig/templates/domain_sections/https.vue +++ b/src/nginxconfig/templates/domain_sections/https.vue @@ -138,7 +138,7 @@ limitations under the License. @@ -223,6 +223,7 @@ limitations under the License. }, letsEncryptEmail: { default: '', + computed: 'info@example.com', // No default value, but a default computed enabled: true, }, sslCertificate: { @@ -346,6 +347,23 @@ limitations under the License. }, deep: true, }, + // Ensure there is a default email for Let's Encrypt + '$props.data.letsEncryptEmail': { + handler(data) { + if (!data.computed.trim()) { + data.computed = `info@${this.$parent.$props.data.server.domain.computed}`; + } + }, + deep: true, + }, + '$parent.$props.data.server.domain': { + handler(data) { + if (!this.$props.data.letsEncryptEmail.value.trim()) { + this.$props.data.letsEncryptEmail.computed = `info@${data.computed}`; + } + }, + deep: true, + }, }, };