Remove www from given domain
parent
9de2b9978d
commit
a5813b7d41
|
@ -46,9 +46,9 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="forceHttps" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="forceHttps" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
(http://{{ $parent.$props.data.server.domain.value }}
|
(http://{{ $parent.$props.data.server.domain.computed }}
|
||||||
<i class="fas fa-long-arrow-alt-right"></i>
|
<i class="fas fa-long-arrow-alt-right"></i>
|
||||||
https://{{ $parent.$props.data.server.domain.value }})
|
https://{{ $parent.$props.data.server.domain.computed }})
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<input v-model="letsEncryptEmail"
|
<input v-model="letsEncryptEmail"
|
||||||
class="input"
|
class="input"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="`info@${$parent.$props.data.server.domain.value}`"
|
:placeholder="`info@${$parent.$props.data.server.domain.computed}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
<input v-model="sslCertificate"
|
<input v-model="sslCertificate"
|
||||||
class="input"
|
class="input"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="`/etc/nginx/ssl/${$parent.$props.data.server.domain.value}.crt`"
|
:placeholder="`/etc/nginx/ssl/${$parent.$props.data.server.domain.computed}.crt`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
<input v-model="sslCertificateKey"
|
<input v-model="sslCertificateKey"
|
||||||
class="input"
|
class="input"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="`/etc/nginx/ssl/${$parent.$props.data.server.domain.value}.key`"
|
:placeholder="`/etc/nginx/ssl/${$parent.$props.data.server.domain.computed}.key`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="wwwSubdomain" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="wwwSubdomain" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
(www.{{ domain }})
|
(www.{{ $props.data.domain.computed }})
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="cdnSubdomain" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="cdnSubdomain" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
(cdn.{{ domain }})
|
(cdn.{{ $props.data.domain.computed }})
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,9 +69,9 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="redirectSubdomains" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="redirectSubdomains" class="p-default p-curve p-fill p-icon">
|
||||||
<i slot="extra" class="icon fas fa-check"></i>
|
<i slot="extra" class="icon fas fa-check"></i>
|
||||||
({{ wwwSubdomain ? `${domain}, ` : '' }}*.{{ domain }}
|
({{ wwwSubdomain ? `${domain}, ` : '' }}*.{{ $props.data.domain.computed }}
|
||||||
<i class="fas fa-long-arrow-alt-right"></i>
|
<i class="fas fa-long-arrow-alt-right"></i>
|
||||||
{{ wwwSubdomain ? 'www.' : '' }}{{ domain }})
|
{{ wwwSubdomain ? 'www.' : '' }}{{ $props.data.domain.computed }})
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -168,6 +168,22 @@
|
||||||
},
|
},
|
||||||
computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
|
computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
|
||||||
watch: {
|
watch: {
|
||||||
|
'$props.data.domain': {
|
||||||
|
handler(data) {
|
||||||
|
// This might cause recursion, but seems not to
|
||||||
|
|
||||||
|
// Ignore www. if given
|
||||||
|
if (data.computed.startsWith('www.')) {
|
||||||
|
data.computed = data.computed.slice(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use default if empty
|
||||||
|
if (!data.computed.trim()) {
|
||||||
|
data.computed = data.default;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
// Only allow CDN when WWW is enabled first
|
// Only allow CDN when WWW is enabled first
|
||||||
'$props.data.wwwSubdomain': {
|
'$props.data.wwwSubdomain': {
|
||||||
handler(data) {
|
handler(data) {
|
||||||
|
|
Loading…
Reference in New Issue