Skip to content

Commit 5225467

Browse files
committed
Auto merge of #12853 - weihanglo:cname-warning, r=ehuss
ci: big ⚠️ to ensure the CNAME file is always there ### What does this PR try to resolve? A request from <https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/doc.2Ecrates.2Eio.20CNAME.20missing> The CNAME file is for GitHub to redirect requests to the custom domain. Missing this may entail security hazard and domain takeover. See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
2 parents 5fab767 + ec9c5b0 commit 5225467

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/contrib.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
# Generate HTML for link redirections.
4444
python3 "$GENERATE_PY"
4545
git add *.html
46+
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
47+
# Missing this may entail security hazard and domain takeover.
48+
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
4649
git add CNAME
4750
4851
git commit -m "Deploy $GITHUB_SHA to gh-pages"

ci/generate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def main():
3939
mapped = "https://doc.rust-lang.org/cargo/reference/{}".format(name)
4040
f.write(TEMPLATE.format(name=name, mapped=mapped))
4141

42+
# WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
43+
# Missing this may entail security hazard and domain takeover.
44+
# See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
4245
with open('CNAME', 'w') as f:
4346
f.write('doc.crates.io')
4447

0 commit comments

Comments
 (0)