diff options
author | =Corey Hulen <corey@hulen.com> | 2015-06-18 10:55:51 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-06-18 10:55:51 -0800 |
commit | 9c639239907e66a01cf9530bd92873a43e9fb822 (patch) | |
tree | 23bf77ac3f411fc03d59b641315fd29ad6d413e3 /web/react | |
parent | 42b023a41db62cdacf6d0e7e029fbc8db7d6ab31 (diff) | |
download | chat-9c639239907e66a01cf9530bd92873a43e9fb822.tar.gz chat-9c639239907e66a01cf9530bd92873a43e9fb822.tar.bz2 chat-9c639239907e66a01cf9530bd92873a43e9fb822.zip |
fix for dockerhost HELIUM
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/utils/constants.jsx | 1 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 13 |
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]; } |