Skip to content

Commit

Permalink
Configure link check to use Accept-Encoding header for docs.github.…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
per1234 committed May 30, 2022
1 parent 40c3a1a commit 4b31856
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"httpHeaders": [
{
"urls": ["https://docs.github.com/"],
"headers": {
"Accept-Encoding": "gzip, deflate, br"
}
}
],
"retryOn429": true,
"retryCount": 3,
"aliveStatusCodes": [200, 206]
Expand Down

0 comments on commit 4b31856

Please sign in to comment.