Merge pull request #30 from mattermost/dockerhost
fix for dockerhost HELIUM
Этот коммит содержится в:
@@ -303,6 +303,10 @@ func IsTestDomain(r *http.Request) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Index(r.Host, "dockerhost") == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
if strings.Index(r.Host, "test") == 0 {
|
if strings.Index(r.Host, "test") == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"LogSettings": {
|
"LogSettings": {
|
||||||
"ConsoleEnable": false,
|
"ConsoleEnable": true,
|
||||||
"ConsoleLevel": "DEBUG",
|
"ConsoleLevel": "INFO",
|
||||||
"FileEnable": true,
|
"FileEnable": true,
|
||||||
"FileLevel": "INFO",
|
"FileLevel": "INFO",
|
||||||
"FileFormat": "",
|
"FileFormat": "",
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ var reservedDomains = []string{
|
|||||||
"channel",
|
"channel",
|
||||||
"internal",
|
"internal",
|
||||||
"localhost",
|
"localhost",
|
||||||
|
"dockerhost",
|
||||||
"stag",
|
"stag",
|
||||||
"post",
|
"post",
|
||||||
"cluster",
|
"cluster",
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ module.exports = {
|
|||||||
"channel",
|
"channel",
|
||||||
"internal",
|
"internal",
|
||||||
"localhost",
|
"localhost",
|
||||||
|
"dockerhost",
|
||||||
"stag",
|
"stag",
|
||||||
"post",
|
"post",
|
||||||
"cluster",
|
"cluster",
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ module.exports.isTestDomain = function() {
|
|||||||
if ((/^localhost/).test(window.location.hostname))
|
if ((/^localhost/).test(window.location.hostname))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if ((/^dockerhost/).test(window.location.hostname))
|
||||||
|
return true;
|
||||||
|
|
||||||
if ((/^test/).test(window.location.hostname))
|
if ((/^test/).test(window.location.hostname))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -75,8 +78,14 @@ module.exports.getDomainWithOutSub = function() {
|
|||||||
|
|
||||||
var parts = window.location.host.split(".");
|
var parts = window.location.host.split(".");
|
||||||
|
|
||||||
if (parts.length == 1)
|
if (parts.length == 1) {
|
||||||
return "localhost:8065";
|
if (parts[0].indexOf("dockerhost") > -1) {
|
||||||
|
return "dockerhost:8065";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "localhost:8065";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return parts[1] + "." + parts[2];
|
return parts[1] + "." + parts[2];
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user