diff options
author | David Lu <david.lu@hotmail.com> | 2016-05-24 08:39:11 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-05-24 08:39:11 -0400 |
commit | 8e5c31859012516afcfc28eddbb644a4c96fe9d3 (patch) | |
tree | 6069dc94d1a3273b4b0c36a09c7b90062eb41c92 /api | |
parent | 34beaa569bfb32f1607375f1d5a22859322060d2 (diff) | |
download | chat-8e5c31859012516afcfc28eddbb644a4c96fe9d3.tar.gz chat-8e5c31859012516afcfc28eddbb644a4c96fe9d3.tar.bz2 chat-8e5c31859012516afcfc28eddbb644a4c96fe9d3.zip |
Removed isTestDomain (#3069)
Diffstat (limited to 'api')
-rw-r--r-- | api/context.go | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/api/context.go b/api/context.go index f87a306d9..5aa35ad89 100644 --- a/api/context.go +++ b/api/context.go @@ -457,70 +457,6 @@ func GetIpAddress(r *http.Request) string { return address } -// func IsTestDomain(r *http.Request) bool { - -// if strings.Index(r.Host, "localhost") == 0 { -// return true -// } - -// if strings.Index(r.Host, "dockerhost") == 0 { -// return true -// } - -// if strings.Index(r.Host, "test") == 0 { -// return true -// } - -// if strings.Index(r.Host, "127.0.") == 0 { -// return true -// } - -// if strings.Index(r.Host, "192.168.") == 0 { -// return true -// } - -// if strings.Index(r.Host, "10.") == 0 { -// return true -// } - -// if strings.Index(r.Host, "176.") == 0 { -// return true -// } - -// return false -// } - -// func IsBetaDomain(r *http.Request) bool { - -// if strings.Index(r.Host, "beta") == 0 { -// return true -// } - -// if strings.Index(r.Host, "ci") == 0 { -// return true -// } - -// return false -// } - -// var privateIpAddress = []*net.IPNet{ -// {IP: net.IPv4(10, 0, 0, 1), Mask: net.IPv4Mask(255, 0, 0, 0)}, -// {IP: net.IPv4(176, 16, 0, 1), Mask: net.IPv4Mask(255, 255, 0, 0)}, -// {IP: net.IPv4(192, 168, 0, 1), Mask: net.IPv4Mask(255, 255, 255, 0)}, -// {IP: net.IPv4(127, 0, 0, 1), Mask: net.IPv4Mask(255, 255, 255, 252)}, -// } - -// func IsPrivateIpAddress(ipAddress string) bool { - -// for _, pips := range privateIpAddress { -// if pips.Contains(net.ParseIP(ipAddress)) { -// return true -// } -// } - -// return false -// } - func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) { T, _ := utils.GetTranslationsAndLocale(w, r) |