mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-10-05 21:31:09 +01:00
Merge pull request #5891 from Amitind/fix/5128-hide-certificate-key
fix: omit certificate_key from certificate API responses
This commit is contained in:
@@ -25,7 +25,7 @@ const certbotLogsDir = "/data/logs";
|
||||
const certbotWorkDir = "/tmp/letsencrypt-lib";
|
||||
|
||||
const omissions = () => {
|
||||
return ["is_deleted", "owner.is_deleted", "meta.dns_provider_credentials"];
|
||||
return ["is_deleted", "owner.is_deleted", "meta.dns_provider_credentials", "meta.certificate_key"];
|
||||
};
|
||||
|
||||
const internalCertificate = {
|
||||
|
||||
@@ -69,6 +69,9 @@ describe('Certificates endpoints', () => {
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('get', 200, '/nginx/certificates', data);
|
||||
expect(data.length).to.be.greaterThan(0);
|
||||
const cert = data.find((c) => c.id === certID);
|
||||
expect(cert.meta).to.have.property('certificate');
|
||||
expect(cert.meta).to.not.have.property('certificate_key');
|
||||
|
||||
// Delete cert
|
||||
cy.task('backendApiDelete', {
|
||||
|
||||
Reference in New Issue
Block a user