소스 검색

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;