Fix SSL custom certificates being saved, nginx errors being reported and leaking custom certs in api calls
This commit is contained in:
@ -189,7 +189,9 @@ const internalRedirectionHost = {
|
||||
.then(row => {
|
||||
// Configure nginx
|
||||
return internalNginx.configure(redirectionHostModel, 'redirection_host', row)
|
||||
.then(() => {
|
||||
.then(new_meta => {
|
||||
row.meta = new_meta;
|
||||
row = internalHost.cleanRowCertificateMeta(row);
|
||||
return _.omit(row, omissions());
|
||||
});
|
||||
});
|
||||
@ -235,6 +237,7 @@ const internalRedirectionHost = {
|
||||
})
|
||||
.then(row => {
|
||||
if (row) {
|
||||
row = internalHost.cleanRowCertificateMeta(row);
|
||||
return _.omit(row, omissions());
|
||||
} else {
|
||||
throw new error.ItemNotFoundError(data.id);
|
||||
@ -322,6 +325,13 @@ const internalRedirectionHost = {
|
||||
}
|
||||
|
||||
return query;
|
||||
})
|
||||
.then(rows => {
|
||||
if (typeof expand !== 'undefined' && expand !== null && expand.indexOf('certificate') !== -1) {
|
||||
return internalHost.cleanAllRowsCertificateMeta(rows);
|
||||
}
|
||||
|
||||
return rows;
|
||||
});
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user