Open jbenezech opened 1 year ago
Because of falsy value checks, when maxRedirects is set to zero, it defaults to _DEFAULT_MAXREDIRECTS.
A workaround to disallow redirects is to instantiate the parser with maxRedirects to 1 and pass this value in the parseURL function
const parser = new Parser<Record<string, unknown>>({maxRedirects: 1}); const feed = await parser.parseURL(url, undefined, 1);
Good catch! Happy to accept a PR here
Because of falsy value checks, when maxRedirects is set to zero, it defaults to _DEFAULT_MAXREDIRECTS.
A workaround to disallow redirects is to instantiate the parser with maxRedirects to 1 and pass this value in the parseURL function