Skip to content

Commit 4b6e54b

Browse files
Merge pull request #57 from justindhillon/fix-linkedIn-False-Positive
Fix linkedIn links being false positives
2 parents 1b1ea61 + 1cd8fd3 commit 4b6e54b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

checkLink.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export async function checkLink(link: string): Promise<boolean> {
2020
try {
2121
await axios.head(link, params);
2222
} catch (err: any) {
23+
// If blocking bots, return false
24+
if (err.response.status === 999) return false;
25+
2326
// If HEAD is not allowed try GET
2427
if (err.response.status === 405) {
2528
try {

0 commit comments

Comments
 (0)