diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-04-17 12:25:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 12:25:02 +0000 |
commit | 15b3372c668a4b6120c614e35d3c38639a04b514 (patch) | |
tree | 5e8312acfc6d759c315f549611804860037f6374 /src/shared/blacklists.js | |
parent | 938fe9f752e393f0ea21def020e849a51ea79300 (diff) | |
parent | 7ece01c534c5961b073f3eb9fc776dc4281aad3e (diff) |
Merge pull request #567 from ueokande/blacklist-with-port
Support blacklist with port
Diffstat (limited to 'src/shared/blacklists.js')
-rw-r--r-- | src/shared/blacklists.js | 4 |
1 files changed, 2 insertions, 2 deletions
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); }); }; |