aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Martischka <pita@pitapoison.de>2010-04-15 09:39:28 +0200
committerPeter Martischka <pita@pitapoison.de>2010-04-15 09:39:28 +0200
commitc619cec8f0339b16d307708f151dd83a21523d3b (patch)
treefa028dd589e27966a97e9131445827a986a3eb87
parent1991849233b5a7d5930308b0a7bcd4777536ac7f (diff)
parent3acc9a3470cc06f969c266d8635380fe9eb52380 (diff)
downloadetherpad-c619cec8f0339b16d307708f151dd83a21523d3b.tar.gz
etherpad-c619cec8f0339b16d307708f151dd83a21523d3b.tar.xz
etherpad-c619cec8f0339b16d307708f151dd83a21523d3b.zip
Merge branch 'master' of http://github.com/ether/pad
-rw-r--r--etherpad/src/main.js20
-rw-r--r--etherpad/src/static/robots.txt1
2 files changed, 13 insertions, 8 deletions
diff --git a/etherpad/src/main.js b/etherpad/src/main.js
index b77d5ee..738df51 100644
--- a/etherpad/src/main.js
+++ b/etherpad/src/main.js
@@ -275,7 +275,7 @@ function checkHost() {
return;
}
- // redirect to etherpad.com
+ // redirect to main site
var newurl = "http://etherpad.com"+request.path;
if (request.query) { newurl += "?"+request.query; }
response.redirect(newurl);
@@ -311,11 +311,13 @@ function checkHTTPS() {
http: 80,
https: 443
};
+
+ // Require HTTPS for the following paths:
var _requiredHttpsPrefixes = [
- '/ep/admin', // pro and etherpad
+ '/ep/admin', // pro and main site
'/ep/account', // pro only
- '/ep/store', // etherpad.com only
- '/ep/pro-account' // etherpad.com only
+ '/ep/store', // main site only
+ '/ep/pro-account' // main site only
];
var httpsRequired = false;
@@ -381,8 +383,9 @@ function handlePath() {
[DirMatcher('/ep/pro-help/'), forward(pro_help_control)]
]);
- var etherpadDotComDispatcher = new Dispatcher();
- etherpadDotComDispatcher.addLocations([
+ // these paths are main site only
+ var mainsiteDispatcher = new Dispatcher();
+ mainsiteDispatcher.addLocations([
['/', maincontrol.render_main],
[DirMatcher('/ep/beta-account/'), forward(pro_beta_control)],
[DirMatcher('/ep/pro-signup/'), forward(pro_signup_control)],
@@ -400,6 +403,7 @@ function handlePath() {
[PrefixMatcher('/ep/'), forward(maincontrol)]
]);
+ // these paths are pro only
var proDispatcher = new Dispatcher();
proDispatcher.addLocations([
['/', pro_main_control.render_main],
@@ -407,7 +411,7 @@ function handlePath() {
]);
// dispatching logic: first try common, then dispatch to
- // etherpad.com or pro.
+ // main site or pro.
if (commonDispatcher.dispatch()) {
return;
@@ -420,7 +424,7 @@ function handlePath() {
return;
}
} else {
- if (etherpadDotComDispatcher.dispatch()) {
+ if (mainsiteDispatcher.dispatch()) {
return;
}
}
diff --git a/etherpad/src/static/robots.txt b/etherpad/src/static/robots.txt
new file mode 100644
index 0000000..4f9540b
--- /dev/null
+++ b/etherpad/src/static/robots.txt
@@ -0,0 +1 @@
+User-agent: * \ No newline at end of file