Files
freno-dev/vercel.json
Michael Freno 92890ce259 feat: add subdomain-based site context with SSR resolution
Resolve the active site from the request Host header on the server and
expose it through a SiteContext provider so the app can vary rendering
per subdomain. Serialize the resolved site into the document shell
(data-site attribute + window.__SITE__) so client hydration matches the
server render. Add host-based Vercel rewrites mapping each subdomain to
its site root, and include unit tests for the site resolution logic.
2026-07-23 09:18:55 -04:00

58 lines
1.5 KiB
JSON

{
"rewrites": [
{
"source": "/api/(.*)",
"has": [{ "type": "host", "value": "gaze.freno.me" }],
"destination": "/api/$1"
},
{
"source": "/api/(.*)",
"has": [{ "type": "host", "value": "inputhalo.freno.me" }],
"destination": "/api/$1"
},
{
"source": "/api/(.*)",
"has": [{ "type": "host", "value": "nessa.freno.me" }],
"destination": "/api/$1"
},
{
"source": "/api/(.*)",
"has": [{ "type": "host", "value": "lineage.freno.me" }],
"destination": "/api/$1"
},
{ "source": "/(.*)", "has": [{ "type": "host", "value": "nessa.freno.me" }], "destination": "/nessa/$1" },
{ "source": "/(.*)", "has": [{ "type": "host", "value": "lineage.freno.me" }], "destination": "/lineage/$1" },
{ "source": "/(.*)", "has": [{ "type": "host", "value": "gaze.freno.me" }], "destination": "/gaze/$1" },
{ "source": "/(.*)", "has": [{ "type": "host", "value": "inputhalo.freno.me" }], "destination": "/inputhalo/$1" }
],
"headers": [
{
"source": "/",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=0, must-revalidate"
}
]
},
{
"source": "/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=0, must-revalidate"
}
]
},
{
"source": "/_build/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
}
]
}