mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-25 19:41:14 -08:00
feat(Wordpress Node): Add option to ignore error when using self signed certificates (#8199)
## Summary Adds option to ignore SSL issues to the Wordpress node, This is useful when using a self signed certificate in a local setup. ## Related tickets and issues https://github.com/n8n-io/n8n/issues/8151
This commit is contained in:
parent
5c078f1b3d
commit
65c8e12b96
|
@ -35,6 +35,13 @@ export class WordpressApi implements ICredentialType {
|
||||||
default: '',
|
default: '',
|
||||||
placeholder: 'https://example.com',
|
placeholder: 'https://example.com',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Ignore SSL Issues',
|
||||||
|
name: 'allowUnauthorizedCerts',
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Whether to connect even if SSL certificate validation is not possible',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
authenticate: IAuthenticateGeneric = {
|
authenticate: IAuthenticateGeneric = {
|
||||||
|
@ -52,6 +59,7 @@ export class WordpressApi implements ICredentialType {
|
||||||
baseURL: '={{$credentials?.url}}/wp-json/wp/v2',
|
baseURL: '={{$credentials?.url}}/wp-json/wp/v2',
|
||||||
url: '/users',
|
url: '/users',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
skipSslCertificateValidation: '={{$credentials.allowUnauthorizedCerts}}',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ export async function wordpressApiRequest(
|
||||||
qs,
|
qs,
|
||||||
body,
|
body,
|
||||||
uri: uri || `${credentials.url}/wp-json/wp/v2${resource}`,
|
uri: uri || `${credentials.url}/wp-json/wp/v2${resource}`,
|
||||||
|
rejectUnauthorized: !credentials.allowUnauthorizedCerts,
|
||||||
json: true,
|
json: true,
|
||||||
};
|
};
|
||||||
options = Object.assign({}, options, option);
|
options = Object.assign({}, options, option);
|
||||||
|
|
Loading…
Reference in a new issue