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 | dbd781c0183a47d25857ea59184a9387d8727490 (patch) | |
tree | da6632672b05f24cfdef28f7fd29267dc98aa5f0 | |
parent | 27c29ed745a1730c579d49dc6d26da5ba88ea155 (diff) | |
download | chat-dbd781c0183a47d25857ea59184a9387d8727490.tar.gz chat-dbd781c0183a47d25857ea59184a9387d8727490.tar.bz2 chat-dbd781c0183a47d25857ea59184a9387d8727490.zip |
fix for dockerhost HELIUM
-rw-r--r-- | api/context.go | 4 | ||||
-rw-r--r-- | config/config.json | 4 | ||||
-rw-r--r-- | model/utils.go | 1 | ||||
-rw-r--r-- | web/react/utils/constants.jsx | 1 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 13 |
5 files changed, 19 insertions, 4 deletions
diff --git a/api/context.go b/api/context.go index 16105c8af..501e4e77f 100644 --- a/api/context.go +++ b/api/context.go @@ -303,6 +303,10 @@ func IsTestDomain(r *http.Request) bool { return true } + if strings.Index(r.Host, "dockerhost") == 0 { + return true + } + if strings.Index(r.Host, "test") == 0 { return true } diff --git a/config/config.json b/config/config.json index 1b844c259..82e40a1c5 100644 --- a/config/config.json +++ b/config/config.json @@ -1,7 +1,7 @@ { "LogSettings": { - "ConsoleEnable": false, - "ConsoleLevel": "DEBUG", + "ConsoleEnable": true, + "ConsoleLevel": "INFO", "FileEnable": true, "FileLevel": "INFO", "FileFormat": "", diff --git a/model/utils.go b/model/utils.go index 8b597000a..2541247de 100644 --- a/model/utils.go +++ b/model/utils.go @@ -160,6 +160,7 @@ var reservedDomains = []string{ "channel", "internal", "localhost", + "dockerhost", "stag", "post", "cluster", 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]; } |