diff --git a/helpers/check-types.js b/helpers/check-types.js index ef13e3b..6c9dc51 100644 --- a/helpers/check-types.js +++ b/helpers/check-types.js @@ -15,7 +15,11 @@ export function isValidHttpUrl( maybeUrl, allowUnsecure = false ) { return false } - return url.protocol === "http:" || url.protocol === "https:" + if ( allowUnsecure ) { + return url.protocol === "http:" || url.protocol === "https:" + } + + return url.protocol === "https:" } export function isObject( maybeObject ) {