mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Invalidate unsecure urls by default
This commit is contained in:
parent
0b6278c209
commit
4ba4a92e68
1 changed files with 5 additions and 1 deletions
|
|
@ -15,9 +15,13 @@ export function isValidHttpUrl( maybeUrl, allowUnsecure = false ) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( allowUnsecure ) {
|
||||||
return url.protocol === "http:" || url.protocol === "https:"
|
return url.protocol === "http:" || url.protocol === "https:"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return url.protocol === "https:"
|
||||||
|
}
|
||||||
|
|
||||||
export function isObject( maybeObject ) {
|
export function isObject( maybeObject ) {
|
||||||
return maybeObject === Object( maybeObject )
|
return maybeObject === Object( maybeObject )
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue