aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexanders@b2ef00c0-3703-41da-baef-cfe82387ac0c <none@none>2010-02-03 11:24:17 +0000
committeralexanders@b2ef00c0-3703-41da-baef-cfe82387ac0c <none@none>2010-02-03 11:24:17 +0000
commitf817d01af684bd27e6978eb21ecbe0a190ead1a7 (patch)
tree21a9cb9bd5b0c60cc8eb26022bc66406ad2675bd
parent6a9f3a384f943d1222a610f192b66132b8d90863 (diff)
downloadetherpad-f817d01af684bd27e6978eb21ecbe0a190ead1a7.tar.gz
etherpad-f817d01af684bd27e6978eb21ecbe0a190ead1a7.tar.xz
etherpad-f817d01af684bd27e6978eb21ecbe0a190ead1a7.zip
fixed handling of superdomains
--HG-- extra : convert_revision : svn%3Ab2ef00c0-3703-41da-baef-cfe82387ac0c/trunk%4018
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() {