SSL certificate upload support
This commit is contained in:
@ -8,6 +8,8 @@ const deadHostModel = require('../models/dead_host');
|
||||
|
||||
const internalHost = {
|
||||
|
||||
allowed_ssl_files: ['other_certificate', 'other_certificate_key'],
|
||||
|
||||
/**
|
||||
* Internal use only, checks to see if the domain is already taken by any other record
|
||||
*
|
||||
@ -64,6 +66,21 @@ const internalHost = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Cleans the ssl keys from the meta object and sets them to "true"
|
||||
*
|
||||
* @param {Object} meta
|
||||
* @returns {*}
|
||||
*/
|
||||
cleanMeta: function (meta) {
|
||||
internalHost.allowed_ssl_files.map(key => {
|
||||
if (typeof meta[key] !== 'undefined' && meta[key]) {
|
||||
meta[key] = true;
|
||||
}
|
||||
});
|
||||
return meta;
|
||||
},
|
||||
|
||||
/**
|
||||
* Private call only
|
||||
*
|
||||
|
Reference in New Issue
Block a user