aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--etherpad/src/etherpad/pro/pro_utils.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/etherpad/src/etherpad/pro/pro_utils.js b/etherpad/src/etherpad/pro/pro_utils.js
index 17487b8..c539223 100644
--- a/etherpad/src/etherpad/pro/pro_utils.js
+++ b/etherpad/src/etherpad/pro/pro_utils.js
@@ -45,15 +45,16 @@ function getProRequestSubdomain() {
}
function getRequestSuperdomain() {
- var parts = request.domain.split('.');
+ var parts = request.domain.split('.').reverse();
parts.pop(); // Remove one level
while (parts.length > 0) {
- var domain = parts.join('.');
+ var domain = parts.reverse().join('.');
if (SUPERDOMAINS[domain]) {
return domain;
}
- parts.pop(); // Remove next level
+ parts = parts.pop(); // Remove next level
}
+ return "foo";
}
function isProDomainRequest() {