Skip to content

Commit 4ab15e9

Browse files
committed
✅ Send "Accept-Encoding" HTTP header when checking "help.github.com"
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
1 parent 6cdcf01 commit 4ab15e9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

tests/check_links_from_markdown_files.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \
66
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
77

88
check_links() {
9-
npx markdown-link-check@^3 --quiet --retry "$file"
9+
npx markdown-link-check@^3 \
10+
--config markdown-link-check.json \
11+
--quiet \
12+
--retry \
13+
"$file"
1014
}
1115

1216
check_markdown_files check_links

tests/markdown-link-check.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"httpHeaders": [
3+
{
4+
"urls": ["https://help.github.com"],
5+
"headers": {
6+
"Accept-Encoding": "br, gzip, deflate"
7+
}
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)