Explorar el Código

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

Code_Uwe hace 1 mes
padre
commit
014223a04b
Se han modificado 1 ficheros con 13 adiciones y 1 borrados
  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;