瀏覽代碼

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;