mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-11 13:44:01 +01:00
Merge pull request #1127 from Zxilly/master
fix: cover edge case of script name
This commit is contained in:
commit
08dff1293e
@ -6,7 +6,7 @@ function customScriptName(req) {
|
||||
if (scriptName) {
|
||||
const url = req.nextUrl.clone();
|
||||
const { pathname } = url;
|
||||
const names = scriptName.split(',').map(name => (name + '.js').trim());
|
||||
const names = scriptName.split(',').map(name => name.trim() + '.js');
|
||||
|
||||
if (names.find(name => pathname.endsWith(name))) {
|
||||
url.pathname = '/umami.js';
|
||||
|
Loading…
Reference in New Issue
Block a user