Skip to content

Commit

Permalink
Fixed headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Nov 18, 2024
1 parent 8dc4ffe commit fb0ff24
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const trackerHeaders = [
key: 'Access-Control-Allow-Origin',
value: '*',
},
{
key: 'Cache-Control',
value: 'public, max-age=86400, must-revalidate',
},
];

const headers = [
Expand Down Expand Up @@ -189,22 +193,7 @@ const config = {
return config;
},
async headers() {
return [
{
source: '/:path*',
headers,
},
{
source: '/script.js',
headers: [
...headers,
{
key: 'Cache-Control',
value: 'public, max-age=86400, must-revalidate',
},
],
},
];
return headers;
},
async rewrites() {
return [
Expand Down

0 comments on commit fb0ff24

Please sign in to comment.