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
  • Loading branch information
alrra committed Jul 1, 2022
1 parent 6cdcf01 commit 5da7383
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/check_links_from_markdown_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

check_links() {
npx markdown-link-check@^3 --quiet --retry "$file"
npx markdown-link-check@^3 \
--config markdown-link-check.json \
--quiet \
--retry \
"$file"
}

check_markdown_files check_links
10 changes: 10 additions & 0 deletions tests/markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"httpHeaders": [
{
"urls": ["https://help.github.com"],
"headers": {
"Accept-Encoding": "br, gzip, deflate"
}
}
]
}

0 comments on commit 5da7383

Please sign in to comment.