mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-01-21 14:26:29 +01:00
Domaincheck with Regex
This commit is contained in:
parent
8cca550990
commit
1fea1a2828
@ -105,7 +105,7 @@ helpers.normalizeDomain = function (domain) {
|
|||||||
|
|
||||||
helpers.extractDomainFromUrl = function (url = '', normalize) {
|
helpers.extractDomainFromUrl = function (url = '', normalize) {
|
||||||
|
|
||||||
if (!url.startsWith('http')) {
|
if (/^(?!(http[s]?|file):\/\/).*/.test(url)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user