*check hostname not url
This commit is contained in:
parent
eac9e7b579
commit
1ef168cd9e
|
@ -195,13 +195,13 @@ export default class WebEngine {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isDomain(details.url) || isIp(details.url)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const originalUrl = new URL(details.url);
|
const originalUrl = new URL(details.url);
|
||||||
const hostname = normalizeDomain(originalUrl.hostname);
|
const hostname = normalizeDomain(originalUrl.hostname);
|
||||||
|
|
||||||
|
if (!isDomain(hostname) || isIp(hostname)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (["chrome:"].includes(originalUrl.protocol)) {
|
if (["chrome:"].includes(originalUrl.protocol)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue