mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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',
|
type: 'string',
|
||||||
default: '',
|
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 = {
|
authenticate: IAuthenticateGeneric = {
|
||||||
|
@ -41,6 +48,7 @@ export class MattermostApi implements ICredentialType {
|
||||||
request: {
|
request: {
|
||||||
baseURL: '={{$credentials.baseUrl}}/api/v4',
|
baseURL: '={{$credentials.baseUrl}}/api/v4',
|
||||||
url: '/users',
|
url: '/users',
|
||||||
|
skipSslCertificateValidation: '={{$credentials?.allowUnauthorizedCerts}}',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ export async function apiRequest(
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json; charset=utf-8',
|
'content-type': 'application/json; charset=utf-8',
|
||||||
},
|
},
|
||||||
|
skipSslCertificateValidation: credentials.allowUnauthorizedCerts as boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.helpers.httpRequestWithAuthentication.call(this, 'mattermostApi', options);
|
return this.helpers.httpRequestWithAuthentication.call(this, 'mattermostApi', options);
|
||||||
|
|
Loading…
Reference in a new issue