diff --git a/src/domutil.js b/src/domutil.js index d42aa68..fd76c12 100644 --- a/src/domutil.js +++ b/src/domutil.js @@ -31,6 +31,9 @@ function isValidURL(url) { if (!['', '443', '80'].includes(url.port)) { return false; } + if (url.hostname === 'localhost') { + return false; + } const lastDot = url.hostname.lastIndexOf('.'); if (lastDot < 1) { return false;