Skip to content

Commit

Permalink
Spoof user-agent to avoid 403 error
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Oct 17, 2024
1 parent 568c8c9 commit 1e03f0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@
linkcheck_ignore = [
"https://pubs.acs.org/doi/*", # Checking dois is forbidden here
]
# Spoof user agent to avoid 403 errors, see
# https://github.com/sphinx-doc/sphinx/issues/10343#issuecomment-1097430133
linkcheck_request_headers = {
r"https://opensource.org/license/bsd-3-clause/": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) "
"Gecko/20100101 Firefox/92.0"
}
}

myst_url_schemes = {
"http": None,
Expand Down

0 comments on commit 1e03f0f

Please sign in to comment.