Skip to content

Commit

Permalink
Merge pull request #57 from justindhillon/fix-linkedIn-False-Positive
Browse files Browse the repository at this point in the history
Fix linkedIn links being false positives
  • Loading branch information
justindhillon authored Jan 27, 2024
2 parents 1b1ea61 + 1cd8fd3 commit 4b6e54b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checkLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export async function checkLink(link: string): Promise<boolean> {
try {
await axios.head(link, params);
} catch (err: any) {
// If blocking bots, return false
if (err.response.status === 999) return false;

// If HEAD is not allowed try GET
if (err.response.status === 405) {
try {
Expand Down

0 comments on commit 4b6e54b

Please sign in to comment.