From f5217caef20eb3b1b248d4d13be536a79295459c Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 23 Apr 2025 16:48:04 +0530 Subject: [PATCH] fix: caching for sprite.svg (#20832) * update cache-control header for sprite.svg * updated regex --- apps/web/next.config.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 8dc35c8d1d..08adfa9c2e 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -498,8 +498,15 @@ const nextConfig = { headers: [CORP_CROSS_ORIGIN_HEADER], }, { - source: "/icons/sprite.svg", - headers: [CORP_CROSS_ORIGIN_HEADER, ACCESS_CONTROL_ALLOW_ORIGIN_HEADER], + source: "/icons/sprite.svg(\\?v=[0-9a-zA-Z\\-\\.]+)?", + headers: [ + CORP_CROSS_ORIGIN_HEADER, + ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, + { + key: "Cache-Control", + value: "public, max-age=31536000, immutable", + }, + ], }, ], ...(isOrganizationsEnabled