Skip to content

Commit

Permalink
Added option rejectUnauthorized to disable tls certificate validati…
Browse files Browse the repository at this point in the history
…on (#96)

* Add insecure parameter passed to constructor

Support request to sites with invalid certificates (development)

* Added option `rejectUnauthorized` to disable tls certificate validation.

* Adding a test

* Improving test

* Cleaning up merge

* integer should be boolean

Co-authored-by: Kiriakos Diamantis <[email protected]>
Co-authored-by: Sean Thomas Burke <[email protected]>
Co-authored-by: Freek Gruntjes <[email protected]>
  • Loading branch information
4 people authored Dec 24, 2021
1 parent 7577349 commit 9256aad
Show file tree
Hide file tree
Showing 6 changed files with 11,041 additions and 25 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ You can add options on the initial Sitemapper object when instantiating it.
+ `debug`: (Boolean) - Enables/Disables debug console logging. Default: False
+ `concurrency`: (Number) - Sets the maximum number of concurrent sitemap crawling threads. Default: 10
+ `retries`: (Number) - Sets the maximum number of retries to attempt in case of an error response (e.g. 404 or Timeout). Default: 0
+ `rejectUnauthorized`: (Boolean) - If true, it will throw on invalid certificates, such as expired or self-signed ones. Default: True

```javascript

const sitemapper = new Sitemapper({
url: 'https://art-works.community/sitemap.xml',
rejectUnauthorized: true,
timeout: 15000,
requestHeaders: {
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/assets/sitemapper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9256aad

Please sign in to comment.