mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
feat(Mattermost Node): Add self signed certificate support (#5630)
This commit is contained in:
parent
45ccdd3bb5
commit
01a2160b3b
|
@ -26,6 +26,13 @@ export class MattermostApi implements ICredentialType {
|
|||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Ignore SSL Issues',
|
||||
name: 'allowUnauthorizedCerts',
|
||||
type: 'boolean',
|
||||
description: 'Whether to connect even if SSL certificate validation is not possible',
|
||||
default: false,
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
|
@ -41,6 +48,7 @@ export class MattermostApi implements ICredentialType {
|
|||
request: {
|
||||
baseURL: '={{$credentials.baseUrl}}/api/v4',
|
||||
url: '/users',
|
||||
skipSslCertificateValidation: '={{$credentials?.allowUnauthorizedCerts}}',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ export async function apiRequest(
|
|||
headers: {
|
||||
'content-type': 'application/json; charset=utf-8',
|
||||
},
|
||||
skipSslCertificateValidation: credentials.allowUnauthorizedCerts as boolean,
|
||||
};
|
||||
|
||||
return this.helpers.httpRequestWithAuthentication.call(this, 'mattermostApi', options);
|
||||
|
|
Loading…
Reference in a new issue