linkinator
Advanced tools
Comparing version 2.8.1 to 2.8.2
@@ -41,2 +41,5 @@ /// <reference types="node" /> | ||
} | ||
export declare const headers: { | ||
'User-Agent': string; | ||
}; | ||
/** | ||
@@ -43,0 +46,0 @@ * Instance class used to perform a crawl job. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.check = exports.LinkChecker = exports.LinkState = void 0; | ||
exports.check = exports.LinkChecker = exports.headers = exports.LinkState = void 0; | ||
const events_1 = require("events"); | ||
@@ -27,2 +27,6 @@ const gaxios = require("gaxios"); | ||
})(LinkState = exports.LinkState || (exports.LinkState = {})); | ||
// Spoof a normal looking User-Agent to keep the servers happy | ||
exports.headers = { | ||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', | ||
}; | ||
/** | ||
@@ -259,5 +263,3 @@ * Instance class used to perform a crawl job. | ||
url: opts.url.href, | ||
headers: { | ||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', | ||
}, | ||
headers: exports.headers, | ||
responseType: opts.crawl ? 'text' : 'stream', | ||
@@ -272,5 +274,3 @@ validateStatus: () => true, | ||
url: opts.url.href, | ||
headers: { | ||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', | ||
}, | ||
headers: exports.headers, | ||
responseType: 'stream', | ||
@@ -296,2 +296,3 @@ validateStatus: () => true, | ||
validateStatus: () => true, | ||
headers: exports.headers, | ||
timeout: opts.checkOptions.timeout, | ||
@@ -298,0 +299,0 @@ }); |
{ | ||
"name": "linkinator", | ||
"description": "Find broken links, missing images, etc in your HTML. Scurry around your site and find all those broken links.", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "JustinBeckwith/linkinator", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62858
808