From 25e821ece450b366990c7c353ec00261d9bbc5a5 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 7 Apr 2010 18:42:31 -0400 Subject: If hidePorts is enabled, don't show port numbers in e.g. emails. Useful when you're running behind a proxy but EP doesn't know it, so that it doesn't tack on :9000 in links in emails. --- etherpad/src/etherpad/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etherpad/src/etherpad/utils.js b/etherpad/src/etherpad/utils.js index 398090c..3e35f00 100644 --- a/etherpad/src/etherpad/utils.js +++ b/etherpad/src/etherpad/utils.js @@ -388,7 +388,7 @@ function isStaticRequest() { function httpsHost(h) { h = h.split(":")[0]; // strip any existing port - if (appjet.config.listenSecurePort != "443") { + if (appjet.config.listenSecurePort != "443" && !appjet.config.hidePorts) { h = (h + ":" + appjet.config.listenSecurePort); } return h; @@ -396,7 +396,7 @@ function httpsHost(h) { function httpHost(h) { h = h.split(":")[0]; // strip any existing port - if (appjet.config.listenPort != "80") { + if (appjet.config.listenPort != "80" && !appjet.config.hidePorts) { h = (h + ":" + appjet.config.listenPort); } return h; -- cgit v1.2.3