Implement Cache-Control header for umami.js

pull/271/head
Frans Allen 2020-10-05 14:45:24 +07:00 committed by GitHub
parent 82b41f9327
commit cc612cb831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -19,4 +19,17 @@ module.exports = {
return config;
},
async headers() {
return [
{
source: '/umami.js',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=2592000', // 30 days
},
],
},
]
},
};