aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--etherpad/src/etherpad/pro/pro_utils.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js
index 5e8b801..3c5a7c9 100644
--- a/etherpad/src/etherpad/pro/pro_utils.js
+++ b/etherpad/src/etherpad/pro/pro_utils.js
@@ -47,11 +47,14 @@ function getProRequestSubdomain() {
function getRequestSuperdomain() {
var parts = request.domain.split('.');
- parts.reverse();
- if (parts[0] == ".") {
+ while (parts.length > 0) {
+ var domain = parts.join('.');
+ if (SUPERDOMAINS[domain]) {
+ return domain;
+ }
parts.shift();
}
- return [parts[1], parts[0]].join('.');
+ return false;
}
function isProDomainRequest() {