Skip to content

Commit 46abcba

Browse files
committed
Configure link check to use Accept-Encoding header for docs.github.com links
The link check job of the "Check Markdown" workflow has had frequent intermittent spurious failures recently, caused by links under the docs.github.com domain returning 403 HTTP status. Others experiencing the same problem reported that they were able to work around the problem by providing a custom `Accept-Encoding` HTTP request header. Although I was not able to find any explanation of why, it does appear to resolve the problem. Since the problem seems to be permanent and the only other workarounds I have identified are unappealing (considering links returning 403 statuses alive, or ignoring all docs.github.com links), I think it is worth a try.
1 parent 34768f6 commit 46abcba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.markdown-link-check.json

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
2+
"httpHeaders": [
3+
{
4+
"urls": ["https://docs.github.com/"],
5+
"headers": {
6+
"Accept-Encoding": "gzip, deflate, br"
7+
}
8+
}
9+
],
210
"retryOn429": true,
311
"retryCount": 3,
412
"aliveStatusCodes": [200, 206]

0 commit comments

Comments
 (0)