mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 06:34:24 +01:00
- 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
30 lines
510 B
JSON
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"
|
|
}
|
|
]
|
|
}
|
|
|