Browse Source

rename ctx.RemoteAddr() to ctx.IP()

remotes/fuxiaohei/master
fud 4 years ago
parent
commit
70bfc05b5c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      context.go

+ 1
- 1
context.go View File

@@ -87,7 +87,7 @@ func (ctx *Context) Params() *Params {
return &ctx.params
}

func (ctx *Context) RemoteAddr() string {
func (ctx *Context) IP() string {
proxy := []string{}
if ips := ctx.Req().Header.Get("X-Forwarded-For"); ips != "" {
proxy = strings.Split(ips, ",")


Loading…
Cancel
Save