Repository navigation
fix: every page lives at its address with no trailing slash - #281
Merged
Merged
Conversation
Canonical addresses and internal links are /apps, /pricing, /security, /download, /planner, /notes, /studio and /engineering, as in the designs. The trailing-slash form redirects: a location rule in nginx.conf, and drop-trailing-slash in wrangler.jsonc. The _redirects file from the Planner change is removed: with auto-trailing-slash it made /planner redirect to /planner/ and back forever on Workers.
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.
Change
Products Research asked for every page to be slashless, as the designs show. This extends #280 from the Planner page to all of them.
/apps,/pricing,/security,/download,/planner,/notes,/studioand/engineering. The home page stays/.301to the slashless one (onelocation ~rule innginx.conf). The slashless form is served as before.html_handlingis nowdrop-trailing-slash, which does the same natively. Workers answers the slash form with its own307, not301.site/public/_redirects. Withauto-trailing-slashit made/plannerredirect to/planner/and the rule redirect back, forever. I reproduced the loop in Cloudflare's local runtime on current main (8 redirects, no answer). The live site runs on nginx, so it never saw this. The Dockerfile no longer needs to delete the file.scripts/serve-site.mjs) follows the same rule.Checks
node scripts/build-site.mjs --check; no internal link in the built pages ends in a slash, and all nine canonical addresses are slashless.deploy/Dockerfile:/booking,/booking/and unknown paths return 404;/_headers,/_redirectsand/assets/return 404./healthzstill return 200, and the Content-Security-Policy is intact.wrangler dev --local(wrangler 4.160.0): every slashless page returns 200 and its slash form redirects once (307); following/planner/takes 1 hop. No loop.Risk and undo
AI usage
Claude Code with Claude Sonnet 5.5 (
claude-sonnet-5-5). No external sources.