SSL certificate upload support

This commit is contained in:
Jamie Curnow
2018-07-23 15:12:24 +10:00
parent 291cb9625e
commit a8d63d0df1
9 changed files with 347 additions and 24 deletions

View File

@ -19,11 +19,20 @@ const model = Backbone.Model.extend({
ssl_forced: false,
caching_enabled: false,
block_exploits: false,
meta: [],
meta: {},
// The following are expansions:
owner: null,
access_list: null
};
},
/**
* @param {String} type 'letsencrypt' or 'other'
* @returns {Boolean}
*/
hasSslFiles: function (type) {
let meta = this.get('meta');
return typeof meta[type + '_certificate'] !== 'undefined' && meta[type + '_certificate'] && typeof meta[type + '_certificate_key'] !== 'undefined' && meta[type + '_certificate_key'];
}
});