MUX optimization

This commit is contained in:
刘河
2019-03-15 14:03:49 +08:00
parent f78e81b452
commit 97330bfbdc
33 changed files with 749 additions and 328 deletions

View File

@@ -46,10 +46,7 @@ func (s *BaseController) display(tpl ...string) {
tplname = s.controllerName + "/" + s.actionName + ".html"
}
ip := s.Ctx.Request.Host
if strings.LastIndex(ip, ":") > 0 {
arr := strings.Split(common.GetHostByName(ip), ":")
s.Data["ip"] = arr[0]
}
s.Data["ip"] = common.GetIpByAddr(ip)
s.Data["bridgeType"] = beego.AppConfig.String("bridge_type")
if common.IsWindows() {
s.Data["win"] = ".exe"