We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ec30b7 commit 13651eaCopy full SHA for 13651ea
1 file changed
src/lib/isURL.js
@@ -145,15 +145,15 @@ export default function isURL(url, options) {
145
return false;
146
}
147
148
+ if (options.host_whitelist) {
149
+ return checkHost(host, options.host_whitelist);
150
+ }
151
if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) {
152
153
154
155
host = host || ipv6;
156
- if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {
- return false;
- }
157
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
158
159
0 commit comments