summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-06-18 14:59:22 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-06-18 14:59:22 -0400
commitbfdd467a3afb03d31004e5371ccdf8df641ae6ca (patch)
treeb4fd704710228940a318463eb93c9fa8eadba28e /web/react
parentbcea40686ae138b24580cac3956cb9e1b3d6c953 (diff)
parentdbd781c0183a47d25857ea59184a9387d8727490 (diff)
downloadchat-bfdd467a3afb03d31004e5371ccdf8df641ae6ca.tar.gz
chat-bfdd467a3afb03d31004e5371ccdf8df641ae6ca.tar.bz2
chat-bfdd467a3afb03d31004e5371ccdf8df641ae6ca.zip
Merge pull request #30 from mattermost/dockerhost
fix for dockerhost HELIUM
Diffstat (limited to 'web/react')
-rw-r--r--web/react/utils/constants.jsx1
-rw-r--r--web/react/utils/utils.jsx13
2 files changed, 12 insertions, 2 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 0a3b1db3d..deb07409b 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -61,6 +61,7 @@ module.exports = {
"channel",
"internal",
"localhost",
+ "dockerhost",
"stag",
"post",
"cluster",
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 628d92342..e57088614 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -28,6 +28,9 @@ module.exports.isTestDomain = function() {
if ((/^localhost/).test(window.location.hostname))
return true;
+ if ((/^dockerhost/).test(window.location.hostname))
+ return true;
+
if ((/^test/).test(window.location.hostname))
return true;
@@ -75,8 +78,14 @@ module.exports.getDomainWithOutSub = function() {
var parts = window.location.host.split(".");
- if (parts.length == 1)
- return "localhost:8065";
+ if (parts.length == 1) {
+ if (parts[0].indexOf("dockerhost") > -1) {
+ return "dockerhost:8065";
+ }
+ else {
+ return "localhost:8065";
+ }
+ }
return parts[1] + "." + parts[2];
}