From 1bd2bf1ae3e78ee2814a8c30991d1d441ff4ddef Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 17 Apr 2019 20:49:47 +0900 Subject: Support blacklist with port --- src/shared/blacklists.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared') diff --git a/src/shared/blacklists.js b/src/shared/blacklists.js index 19ed3f1..61720c3 100644 --- a/src/shared/blacklists.js +++ b/src/shared/blacklists.js @@ -4,9 +4,9 @@ const includes = (blacklist, url) => { let u = new URL(url); return blacklist.some((item) => { if (!item.includes('/')) { - return re.fromWildcard(item).test(u.hostname); + return re.fromWildcard(item).test(u.host); } - return re.fromWildcard(item).test(u.hostname + u.pathname); + return re.fromWildcard(item).test(u.host + u.pathname); }); }; -- cgit v1.2.3