Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

feat: add cache control headers to GET response

Yash92fee4fe2682
diff --git a/src/app/(collect)/p/[slug]/route.ts b/src/app/(collect)/p/[slug]/route.ts
index 79d6faa5c..0688df95e 100644
--- a/src/app/(collect)/p/[slug]/route.ts
+++ b/src/app/(collect)/p/[slug]/route.ts
@@ -63,6 +63,9 @@ export async function GET(request: Request, { params }: { params: Promise<{ slug
headers: {
'Content-Type': 'image/gif',
'Content-Length': image.length.toString(),
+ 'Cache-Control': 'no-cache, no-store, must-revalidate',
+ Pragma: 'no-cache',
+ Expires: '0',
},
});
}