Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions frontends/main/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,19 @@ const nextConfig = {

async headers() {
return [
/* This is intended to target the base HTML responses. Some are dynamically rendered,
* so Next.js instructs no-cache, however we are currently serving public content that
* is cacheable. Excludes everything with a file extension so we're matching only on routes.
/* This is intended to target the base HTML responses and streamed RSC
* content. Some routes are dynamically rendered, so NextJS by default
* sets no-cache. However we are currently serving public content that is
* cacheable.
*
* Excludes everything with a file extension so we're matching only on routes.
*/
{
source: "/((?!.*\\.[a-zA-Z0-9]{2,4}$).*)",
headers: [
{
key: "Cache-Control",
value: "s-maxage=120",
value: "s-maxage=1800",
},
],
},
Expand All @@ -58,7 +61,7 @@ const nextConfig = {
headers: [
{
key: "Cache-Control",
value: "s-maxage=600",
value: "s-maxage=31536000",
},
],
},
Expand Down
Loading