Files
boris/vercel.json
Gigi c81b7b89d1 feat: implement storage-backed OG previews with Upstash Redis
- Add ogStore service for Redis get/set operations
- Extract shared logic: ogHtml (generateHtml, escapeHtml) and articleMeta (relay/gateway fetching)
- Refactor article-og endpoint to read from Redis, try gateway on miss, trigger background refresh
- Add article-og-refresh endpoint for background relay fetching and caching
- Update vercel.json with refresh function config
- Remove WebSocket dependencies from main OG endpoint for faster crawler responses
2025-11-07 18:41:08 +01:00

23 lines
352 B
JSON

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