mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Merge pull request #3046 from michaelpayne02/master
add Cache-Control headers to tracking script
This commit is contained in:
commit
327b2c81cf
1 changed files with 16 additions and 1 deletions
|
|
@ -189,7 +189,22 @@ const config = {
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
async headers() {
|
async headers() {
|
||||||
return headers;
|
return [
|
||||||
|
{
|
||||||
|
source: '/:path*',
|
||||||
|
headers,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/script.js',
|
||||||
|
headers: [
|
||||||
|
...headers,
|
||||||
|
{
|
||||||
|
key: 'Cache-Control',
|
||||||
|
value: 'public, max-age=86400, must-revalidate',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
},
|
},
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue