mirror of https://github.com/gorhill/uBlock.git
Fix hostname extraction when URL has port
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1001 The issue affected only the uncloaking of canonical names, when the authority part of a URL contained port information.
This commit is contained in:
parent
6259f88598
commit
bdf9030a98
|
@ -150,7 +150,7 @@ vAPI.webextFlavor = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const reHostnameFromNetworkURL =
|
const reHostnameFromNetworkURL =
|
||||||
/^(?:http|ws|ftp)s?:\/\/([0-9a-z_][0-9a-z._-]*[0-9a-z])\//;
|
/^(?:http|ws|ftp)s?:\/\/([0-9a-z_][0-9a-z._-]*[0-9a-z])(?::\d+)?\//;
|
||||||
|
|
||||||
vAPI.hostnameFromNetworkURL = function(url) {
|
vAPI.hostnameFromNetworkURL = function(url) {
|
||||||
const matches = reHostnameFromNetworkURL.exec(url);
|
const matches = reHostnameFromNetworkURL.exec(url);
|
||||||
|
|
Loading…
Reference in New Issue