pull/1682/merge
altude 2022-11-30 14:35:25 -08:00 committed by GitHub
commit c8218a3e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@
document,
history,
} = window;
const { hostname, pathname, search } = location;
const { hostname, pathname, search, protocol } = location;
const { currentScript } = document;
if (!currentScript) return;
@ -45,7 +45,8 @@
const trackingDisabled = () =>
(localStorage && localStorage.getItem('umami.disabled')) ||
(dnt && doNotTrack()) ||
(domain && !domains.includes(hostname));
(domain && !domains.includes(hostname)) ||
(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(hostname) || protocol === 'file:');
const _data = 'data-';
const _false = 'false';