site: emit the URLs Cloudflare actually serves - #359
Merged
Conversation
Cloudflare's static-asset handler 307s /install.html to /install, so every canonical, og:url, sitemap entry, JSON-LD id, and internal link we emitted pointed at a redirect rather than at the served URL. A canonical that redirects is treated as a soft error, which would have undercut the whole SEO pass and the domain move at the same time. All emitted URLs are now extensionless, matching what the asset handler returns. Files keep their .html names on disk; only the links change. Verified: no href ending in .html remains in any generated page, the analytics tests still pass, and --check is green.
Cloudflare serves a matching static asset without invoking the script, so worker/index.js never ran for any real page and burrow.henryzh.dev returned 200 instead of redirecting. Verified against the live deploy: /, /install and /docs all served 200 on the old host. run_worker_first sends every request through the worker, which 301s the legacy hostname and otherwise falls through to env.ASSETS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cloudflare's static-asset handler 307s
/install.htmlto/install. Every canonical,og:url, sitemap entry, JSON-LD@id, and internal link pointed at the redirect rather than the served URL, so each canonical pointed at a redirect, which is treated as a soft error.All emitted URLs are extensionless now. Files keep their
.htmlnames on disk; only links change.Verified: no href ending in
.htmlin any generated page,--checkgreen, 7/7 analytics tests and 44/44 release-helper tests pass.