Moved telemetry code to script.

This commit is contained in:
Mike Cao 2022-08-02 00:24:17 -07:00
parent 3d7e9392f0
commit a4a6888248
4 changed files with 25 additions and 11 deletions

View file

@ -56,14 +56,13 @@ module.exports = {
source: '/:path*',
headers,
},
];
},
async rewrites() {
return [
{
source: `/(.*\\.js)`,
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=2592000', // 30 days
},
],
source: '/telemetry.js',
destination: '/api/scripts/telemetry',
},
];
},