forked from StudentTraineeCenter/zpevnicek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
33 lines (32 loc) · 1014 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const withPWA = require("next-pwa");
module.exports = withPWA({
trailingSlash: true,
async headers() {
return [
{
source: "/song/:slug*",
headers: [
/*
s-maxage=2419200, // Set the max age of the cached content to a month (28 days)
stale-while-revalidate=1209600, // Stale whhile revalidate for a fortnight
stale-if-error=31536000`, // If an error occurs with the revalidation of the cached content, then the cached content will be served for a maximum of a year (365 days)
*/
{
key: "Cache-Control",
value:
"public,s-maxage=2419200,stale-while-revalidate=1209600,stale-if-error=31536000",
},
{
key: "X-Frame-Options",
value: "ALLOW-FROM https://teams.microsoft.com/",
},
],
},
];
},
pwa: {
dest: "public",
cacheOnFrontEndNav: true,
disable: process.env.NODE_ENV === "development",
},
});