Skip to content

Commit

Permalink
feat(RSS Read Node): Add support for self signed certificates (#7039)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored Aug 30, 2023
1 parent dfe0fa6 commit 3b9f0fe
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,30 @@ export class RssFeedRead implements INodeType {
required: true,
description: 'URL of the RSS feed',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
options: [
{
displayName: 'Ignore SSL Issues',
name: 'ignoreSSL',
type: 'boolean',
default: false,
description: 'Whether to ignore SSL/TLS certificate issues or not',
},
],
},
],
};

async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
try {
const url = this.getNodeParameter('url', 0) as string;
const options = this.getNodeParameter('options', 0);
const ignoreSSL = Boolean(options.ignoreSSL);

if (!url) {
throw new NodeOperationError(this.getNode(), 'The parameter "URL" has to be set!');
Expand All @@ -59,7 +77,11 @@ export class RssFeedRead implements INodeType {
throw new NodeOperationError(this.getNode(), 'The provided "URL" is not valid!');
}

const parser = new Parser();
const parser = new Parser({
requestOptions: {
rejectUnauthorized: !ignoreSSL,
},
});

let feed: Parser.Output<IDataObject>;
try {
Expand Down

0 comments on commit 3b9f0fe

Please sign in to comment.