aboutsummaryrefslogtreecommitdiff
path: root/html/preferences_panel/pref.js
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2019-03-26 22:45:37 +0100
committerhackademix <giorgio@maone.net>2019-03-26 22:45:37 +0100
commit9884643742b54b88f94111d62f5e89a12a60e604 (patch)
treef367f5b7aa7ae3b950c26a946b54b737e6014a5c /html/preferences_panel/pref.js
parent55469c349c3c47c882ee21348ba67780c8291003 (diff)
Subdomain wildcard support.
Diffstat (limited to 'html/preferences_panel/pref.js')
-rw-r--r--html/preferences_panel/pref.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/html/preferences_panel/pref.js b/html/preferences_panel/pref.js
index 9cecbb6..debb468 100644
--- a/html/preferences_panel/pref.js
+++ b/html/preferences_panel/pref.js
@@ -40,6 +40,9 @@
error = "Only one single trailing path wildcard (/*) allowed";
}
} catch (e) {
+ if (/^https?:\/\/\*\./.test(url)) {
+ return this.malformedUrl(url.replace("*.", ""));
+ }
error = "Invalid URL";
if (url && !url.includes("://")) error += ": missing protocol, either http:// or https://";
else if (url.endsWith("://")) error += ": missing domain name";