1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 12:40:40 +00:00

beego: update namespace

This commit is contained in:
astaxie
2014-05-23 15:56:25 +08:00
parent 17104c25a2
commit 0d17d974cd
4 changed files with 74 additions and 5 deletions

View File

@ -161,7 +161,8 @@ func (input *BeegoInput) IsUpload() bool {
func (input *BeegoInput) IP() string {
ips := input.Proxy()
if len(ips) > 0 && ips[0] != "" {
return ips[0]
rip := strings.Split(ips[0], ":")
return rip[0]
}
ip := strings.Split(input.Request.RemoteAddr, ":")
if len(ip) > 0 {