mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Added middleware for docker.
This commit is contained in:
parent
3eabe9b958
commit
ac8d8bbd1e
4 changed files with 59 additions and 1 deletions
|
|
@ -44,6 +44,17 @@ if (process.env.COLLECT_API_ENDPOINT) {
|
|||
});
|
||||
}
|
||||
|
||||
if (process.env.TRACKER_SCRIPT_NAME) {
|
||||
const match = process.env.TRACKER_SCRIPT_NAME?.match(/\/?(\w+)(\.js)?/);
|
||||
|
||||
if (match) {
|
||||
rewrites.push({
|
||||
source: `/${match[0]}.js`,
|
||||
destination: '/script.js',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const redirects = [];
|
||||
|
||||
if (process.env.CLOUD_MODE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue