From 401cffde57aa153bc2d1589bc8d11d7951f2ade1 Mon Sep 17 00:00:00 2001 From: Bram Kn Date: Thu, 18 May 2023 18:34:33 +0200 Subject: [PATCH] feat(Gotify Node): Add support for self signed certificates (#6053) --- .../nodes-base/credentials/GotifyApi.credentials.ts | 13 +++++++++++++ .../nodes-base/nodes/Gotify/GenericFunctions.ts | 1 + 2 files changed, 14 insertions(+) diff --git a/packages/nodes-base/credentials/GotifyApi.credentials.ts b/packages/nodes-base/credentials/GotifyApi.credentials.ts index 2edd236f9..6d86c0872 100644 --- a/packages/nodes-base/credentials/GotifyApi.credentials.ts +++ b/packages/nodes-base/credentials/GotifyApi.credentials.ts @@ -12,6 +12,9 @@ export class GotifyApi implements ICredentialType { displayName: 'App API Token', name: 'appApiToken', type: 'string', + typeOptions: { + password: true, + }, default: '', description: '(Optional) Needed for message creation', }, @@ -19,6 +22,9 @@ export class GotifyApi implements ICredentialType { displayName: 'Client API Token', name: 'clientApiToken', type: 'string', + typeOptions: { + password: true, + }, default: '', description: '(Optional) Needed for everything (delete, getAll) but message creation', }, @@ -29,5 +35,12 @@ export class GotifyApi implements ICredentialType { default: '', description: 'The URL of the Gotify host', }, + { + displayName: 'Ignore SSL Issues', + name: 'ignoreSSLIssues', + type: 'boolean', + default: false, + description: 'Whether to connect even if SSL certificate validation is not possible', + }, ]; } diff --git a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts index b9c50da91..5194c5358 100644 --- a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts @@ -31,6 +31,7 @@ export async function gotifyApiRequest( qs, uri: uri || `${credentials.url}${path}`, json: true, + rejectUnauthorized: credentials.ignoreSSLIssues as boolean, }; try { if (Object.keys(body as IDataObject).length === 0) {