refactor: using requestHeader internal func (#1083)

* refactor: using requestHeader internal func.

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-08-26 05:02:47 -05:00
committed by Javier Provecho Fernandez
parent fa391a4864
commit 211c48f040
2 changed files with 2 additions and 2 deletions

View File

@ -509,7 +509,7 @@ func (c *Context) ClientIP() string {
}
if c.engine.AppEngine {
if addr := c.Request.Header.Get("X-Appengine-Remote-Addr"); addr != "" {
if addr := c.requestHeader("X-Appengine-Remote-Addr"); addr != "" {
return addr
}
}