mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
35 lines
626 B
JavaScript
35 lines
626 B
JavaScript
require('dotenv').config();
|
|
const pkg = require('./package.json');
|
|
|
|
module.exports = {
|
|
env: {
|
|
VERSION: pkg.version,
|
|
FORCE_SSL: !!process.env.FORCE_SSL,
|
|
},
|
|
basePath: process.env.BASE_PATH,
|
|
webpack(config) {
|
|
config.module.rules.push({
|
|
test: /\.svg$/,
|
|
issuer: {
|
|
test: /\.js$/,
|
|
},
|
|
use: ['@svgr/webpack'],
|
|
});
|
|
|
|
return config;
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/umami.js',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'public, max-age=2592000', // 30 days
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|