fixed privacy routing

This commit is contained in:
2026-08-28 13:16:28 -04:00
parent 9860213760
commit 6c024342ba
9 changed files with 191 additions and 15 deletions

View File

@@ -4,7 +4,9 @@ import NotFound from "./[...404]";
import NessaPrivacyPolicy from "./nessa/privacy";
import LineagePrivacyPolicy from "./lineage/privacy";
import GazePrivacyPolicy from "./gaze/privacy";
import InputHaloPrivacyPolicy from "./inputhalo/privacy";
import NookPrivacyPolicy from "./nook/privacy";
import MainPrivacyPolicy from "./privacy-policy/index";
/**
* Host-aware privacy policy route — `/privacy`.
*
@@ -18,16 +20,20 @@ import NookPrivacyPolicy from "./nook/privacy";
* (SolidStart's client `Router` matches on `window.location.pathname`, not the
* rewritten server path).
*
* The main site has no `/privacy` page (it uses `/privacy-policy/*`), so
* `main` falls back to the 404 handler — preserving its pre-rewrite behavior.
* The main site's policy lives at `/privacy-policy` (a legacy path, so the
* page stays there for SEO); `main` renders it here at the public path
* `/privacy`, so both URLs serve the same content on `freno.me`.
*
* Legacy `/privacy-policy/<product>` routes 308-redirect to the corresponding
* subdomain `/privacy` (see `src/routes/privacy-policy/*.tsx`).
* Legacy `/privacy-policy/<product>` routes 308-redirect to the
* corresponding subdomain `/privacy` (see `src/routes/privacy-policy/*.tsx`).
*/
export default function PrivacyPage() {
const site = useSite();
return (
<Switch fallback={<NotFound />}>
<Match when={site().id === "main"}>
<MainPrivacyPolicy />
</Match>
<Match when={site().id === "nessa"}>
<NessaPrivacyPolicy />
</Match>