From 83c880160af9430156f317f7e1e166c682c365a8 Mon Sep 17 00:00:00 2001 From: John Pham Date: Sun, 29 Mar 2026 11:47:01 -0700 Subject: [PATCH] perf: add CDN cache headers to metatags endpoint (#3663) --- apps/web/app/api/links/metatags/route.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web/app/api/links/metatags/route.ts b/apps/web/app/api/links/metatags/route.ts index 083a23176a0..6978b75cb93 100644 --- a/apps/web/app/api/links/metatags/route.ts +++ b/apps/web/app/api/links/metatags/route.ts @@ -37,7 +37,12 @@ export async function GET(req: NextRequest) { poweredBy: "Dub - The Modern Link Attribution Platform", }, { - headers: corsHeaders, + headers: { + ...corsHeaders, + "Cache-Control": "public, max-age=300", + "Vercel-CDN-Cache-Control": + "s-maxage=3600, stale-while-revalidate=86400", + }, }, ); } catch (error) {