mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
URL filter functionality.
This commit is contained in:
parent
6bc371352c
commit
4fded49b03
27 changed files with 251 additions and 117 deletions
|
|
@ -13,7 +13,7 @@ export const urlFilter = (data, { raw }) => {
|
|||
|
||||
const cleanUrl = url => {
|
||||
try {
|
||||
const { pathname, search } = new URL(url);
|
||||
const { pathname, search } = new URL(url, location.origin);
|
||||
|
||||
if (search.startsWith('?/')) {
|
||||
return `${pathname}${search}`;
|
||||
|
|
@ -30,7 +30,7 @@ export const urlFilter = (data, { raw }) => {
|
|||
return obj;
|
||||
}
|
||||
|
||||
const url = cleanUrl(`http://x${x}`);
|
||||
const url = cleanUrl(x);
|
||||
|
||||
if (url) {
|
||||
if (!obj[url]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue