mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Updated date range handling. Fixed share page.
This commit is contained in:
parent
3fc5f5151b
commit
696d9c978c
28 changed files with 166 additions and 280 deletions
|
|
@ -2,6 +2,8 @@
|
|||
require('dotenv').config();
|
||||
const pkg = require('./package.json');
|
||||
|
||||
const CLOUD_URL = 'https://cloud.umami.is';
|
||||
|
||||
const contentSecurityPolicy = `
|
||||
default-src 'self';
|
||||
img-src *;
|
||||
|
|
@ -33,11 +35,29 @@ if (process.env.FORCE_SSL) {
|
|||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
const rewrites = [];
|
||||
|
||||
if (process.env.COLLECT_API_ENDPOINT) {
|
||||
rewrites.push({
|
||||
source: 'process.env.COLLECT_API_ENDPOINT',
|
||||
destination: '/api/in',
|
||||
});
|
||||
}
|
||||
|
||||
const redirects = [];
|
||||
|
||||
if (process.env.CLOUD_MODE) {
|
||||
redirects.push({
|
||||
source: '/login',
|
||||
destination: CLOUD_URL,
|
||||
permanent: false,
|
||||
});
|
||||
}
|
||||
|
||||
const config = {
|
||||
env: {
|
||||
currentVersion: pkg.version,
|
||||
isProduction: process.env.NODE_ENV === 'production',
|
||||
uiDisabled: !!process.env.DISABLE_UI,
|
||||
},
|
||||
basePath: process.env.BASE_PATH,
|
||||
output: 'standalone',
|
||||
|
|
@ -66,10 +86,16 @@ module.exports = {
|
|||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
...rewrites,
|
||||
{
|
||||
source: '/telemetry.js',
|
||||
destination: '/api/scripts/telemetry',
|
||||
},
|
||||
];
|
||||
},
|
||||
async redirects() {
|
||||
return [...redirects];
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue