Skip to content

Commit

Permalink
✅ Send "Accept-Encoding" HTTP header when checking "help.github.com"
Browse files Browse the repository at this point in the history
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also:

* github/docs#17358
* tcort/markdown-link-check#201
  • Loading branch information
alrra committed Jul 2, 2022
1 parent d3c8f89 commit 6e3e6a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/check-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ declare markdownFiles=$( \
);

for file in $markdownFiles; do
markdown-link-check --progress --retry --verbose "$file" \
|| exitCode=1
markdown-link-check \
--config scripts/markdown-link-check.json \
--progress \
--retry \
--verbose \
"$file" \
|| exitCode=1
done

exit $exitCode
13 changes: 13 additions & 0 deletions scripts/markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"fallbackRetryDelay": "30s",
"httpHeaders": [
{
"urls": ["https://help.github.com"],
"headers": {
"Accept-Encoding": "br, gzip, deflate"
}
}
],
"retryCount": 5,
"retryOn429": true
}

0 comments on commit 6e3e6a8

Please sign in to comment.