summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-18 12:23:02 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-18 12:23:02 -0700
commit19e9a4121820a1ad124a4189837c8c4088c33439 (patch)
tree29fa0399d83a9b8849bd5eae4396fa6f620112da /web/react/utils
parent9d582a5a7ad758a10f456d769f020ac0b7933c16 (diff)
parentaee643e20c8e8350a1137aa69e164218fe5a33f1 (diff)
downloadchat-19e9a4121820a1ad124a4189837c8c4088c33439.tar.gz
chat-19e9a4121820a1ad124a4189837c8c4088c33439.tar.bz2
chat-19e9a4121820a1ad124a4189837c8c4088c33439.zip
Merge pull request #11 from mattermost/master
to me
Diffstat (limited to 'web/react/utils')
-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];
}