diff --git a/packages/nodes-base/credentials/MattermostApi.credentials.ts b/packages/nodes-base/credentials/MattermostApi.credentials.ts index 62cd723607c68..afddc454fc7e1 100644 --- a/packages/nodes-base/credentials/MattermostApi.credentials.ts +++ b/packages/nodes-base/credentials/MattermostApi.credentials.ts @@ -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}}', }, }; } diff --git a/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts b/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts index 2a5626edfe93f..b5f650da5ffc7 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/transport/index.ts @@ -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);