Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

perf: add CDN cache headers to metatags endpoint (#3663)

John Pham83c880160af9
diff --git a/apps/web/app/api/links/metatags/route.ts b/apps/web/app/api/links/metatags/route.ts
index 083a23176a..6978b75cb9 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) {