mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
19 lines
420 B
TypeScript
19 lines
420 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import ossStats from '@/lib/data/oss-stats.json' with { type: 'json' }
|
|
|
|
export const revalidate = 3600 // Hourly cache
|
|
|
|
export async function GET() {
|
|
return NextResponse.json(
|
|
{
|
|
...ossStats,
|
|
servedAt: new Date().toISOString(),
|
|
},
|
|
{
|
|
headers: {
|
|
'Cache-Control': 'public, s-maxage=3600, stale-while-revalidate=86400',
|
|
},
|
|
},
|
|
)
|
|
}
|