Skip to content

Commit ffb792d

Browse files
committed
feat: cache response
1 parent 0e4db6d commit ffb792d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/site/app/api/site.json/route.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { NextResponse } from 'next/server';
22

33
import { siteConfig } from '#site/next.json.mjs';
44

5-
export const GET = () => NextResponse.json(siteConfig);
5+
export const GET = () =>
6+
NextResponse.json(siteConfig, {
7+
headers: {
8+
'Cache-Control': 'public, max-age=300, stale-while-revalidate=3600',
9+
},
10+
});
611

712
export const dynamic = 'force-static';

0 commit comments

Comments
 (0)