request via cloudflare dns working

This commit is contained in:
Jaap-Jan de Wit
2020-08-23 12:50:41 +00:00
parent b9a95840e0
commit ff1770204c
4 changed files with 55 additions and 4 deletions

View File

@ -21,7 +21,7 @@ module.exports = Mn.View.extend({
other_certificate: '#other_certificate',
other_certificate_key: '#other_certificate_key',
other_intermediate_certificate: '#other_intermediate_certificate',
cloudflare_switch: 'input[name="use_cloudflare"]',
cloudflare_switch: 'input[name="meta[cloudflare_use]"]',
cloudflare: '.cloudflare'
},
@ -50,6 +50,9 @@ module.exports = Mn.View.extend({
if (typeof data.meta !== 'undefined' && typeof data.meta.letsencrypt_agree !== 'undefined') {
data.meta.letsencrypt_agree = !!data.meta.letsencrypt_agree;
}
if (typeof data.meta !== 'undefined' && typeof data.meta.cloudflare_use !== 'undefined') {
data.meta.cloudflare_use = !!data.meta.cloudflare_use;
}
if (typeof data.domain_names === 'string' && data.domain_names) {
data.domain_names = data.domain_names.split(',');
@ -140,6 +143,10 @@ module.exports = Mn.View.extend({
getLetsencryptAgree: function () {
return typeof this.meta.letsencrypt_agree !== 'undefined' ? this.meta.letsencrypt_agree : false;
},
getCloudflareUse: function () {
return typeof this.meta.cloudflare_use !== 'undefined' ? this.meta.cloudflare_use : false;
}
},