Files
boris/vercel.json
Gigi 5a5cfb7edd fix: use sentinel query param for OG redirect to preserve /a/:naddr paths
- Change OG HTML redirect to use ?_spa=1 query param instead of redirecting to /
- Simplify vercel.json rewrites: serve SPA when _spa=1, otherwise serve OG HTML
- Remove brittle user-agent detection patterns
- Add cleanup effect to strip _spa param from URL after SPA loads
- Fixes refresh redirect regression while maintaining OG preview support
2025-11-07 23:11:41 +01:00

30 lines
510 B
JSON

{
"version": 2,
"functions": {
"api/article-og.ts": {
"maxDuration": 10
},
"api/article-og-refresh.ts": {
"maxDuration": 10
}
},
"rewrites": [
{
"source": "/a/:naddr",
"destination": "/index.html",
"has": [
{ "type": "query", "key": "_spa", "value": "1" }
]
},
{
"source": "/a/:naddr",
"destination": "/api/article-og?naddr=:naddr"
},
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}