Преглед на файлове

RHL-046 feat(next.config): add caching headers for overview cards

Code_Uwe преди 1 месец
родител
ревизия
014223a04b
променени са 1 файла, в които са добавени 13 реда и са изтрити 1 реда
  1. 13 1
      next.config.mjs

+ 13 - 1
next.config.mjs

@@ -1,6 +1,18 @@
 /** @type {import('next').NextConfig} */
 const nextConfig = {
-  /* config options here */
+	async headers() {
+		return [
+			{
+				source: "/overview-cards/v2/:path*",
+				headers: [
+					{
+						key: "Cache-Control",
+						value: "public, max-age=31536000, immutable",
+					},
+				],
+			},
+		];
+	},
 };
 
 export default nextConfig;