Repository navigation
fix(public): point brief-requested nav and back links at clean non-307 paths #145
Changes from 6 commits
9b0589a
825946b
5d365f6
edc128a
47d42e7
d528c77
b92c1af
7fe35ee
db3f3bd
e30341b
9e5b413
c04def9
28dda3e
8fbedbc
babd9eb
84070b3
cb93c9e
169b238
9aaa581
314482a
bf66463
7b629b5
db4c381
e362999
f463517
6a25b93
798f1ea
eb63fb6
b5fa4cd
4047a7f
ce8aeec
8da0d64
1b4139a
4c81fd4
c1cd4fb
ef53651
0659838
9cab3ba
6409b3e
57cbb3f
61e4a80
336eed4
b47e92d
a68969b
f6d7b25
dc8e659
601cdbe
0189c35
71d8b95
5359b52
bb1c217
f5589ba
30c2673
6682409
24e06b6
74d21a3
3144763
3459a9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1508,17 +1508,20 @@ for (const [pageName, pageHtml, pageUrl] of structuredDataPages) { | |
| // point at the final destination URL: the dogfood run reported every .html | ||
| // navigation target on home ("index.html" -> "/", "audit.html" -> "/audit", | ||
| // "agents.html" -> "/agents", "pricing.html" -> "/pricing", "specimen.html" -> | ||
| // "/specimen") as a redirecting internal link. The five public pages must | ||
| // therefore point every page link at the clean URL the worker serves, never | ||
| // at a .html file that resolves to it. These are STATIC SOURCE GUARDS (regex | ||
| // over the served files): CI has no browser, so they assert the .html target | ||
| // shape cannot return, not that the redirects are absent on the network. | ||
| // "/specimen") as a redirecting internal link. The five public pages (and the | ||
| // /brief-requested post-signup page, which carries the same logo/nav/back | ||
| // shell) must therefore point every page link at the clean URL the worker | ||
| // serves, never at a .html file that resolves to it. These are STATIC SOURCE | ||
| // GUARDS (regex over the served files): CI has no browser, so they assert the | ||
| // .html target shape cannot return, not that the redirects are absent on the | ||
| // network. | ||
| const internalLinkPages = [ | ||
| ["homepage", siteHome], | ||
| ["audit page", siteAudit], | ||
| ["desk page", read("public/agents.html")], | ||
| ["pricing page", read("public/pricing.html")], | ||
| ["specimen page", read("public/specimen.html")] | ||
| ["specimen page", read("public/specimen.html")], | ||
| ["brief-requested page", read("public/brief-requested.html")] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When any guarded page contains Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a future edit on the newly guarded confirmation page uses valid single-quoted markup such as Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a link on the newly guarded confirmation page includes a query string, such as Useful? React with 👍 / 👎. |
||
| ]; | ||
|
|
||
| const htmlPageTargets = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a future edit on this newly guarded page uses a root-relative redirecting URL such as
href="/audit.html", the check still passes:targetremains/audit.html, whilehtmlPageTargetsonly contains the bareaudit.htmlkey. This permits the same 307-producing link shape the guard claims to prevent; normalize leading/and./forms (or parse the pathname) before the lookup.Useful? React with 👍 / 👎.