From 15559d0be2c980b67fd70ebaf7132265ebc3fcfc Mon Sep 17 00:00:00 2001 From: Howl Date: Wed, 6 Jul 2016 19:35:49 +0200 Subject: [PATCH] use c.ClientIP() rather than manually accessing c.Request.RemoteAddr --- app/method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/method.go b/app/method.go index d4d4379..6e985fa 100644 --- a/app/method.go +++ b/app/method.go @@ -51,7 +51,7 @@ func initialCaretaker(c *gin.Context, f func(md common.MethodData) common.CodeMe } } - perUserRequestLimiter(md.ID(), c.Request.Header.Get("X-Real-IP")) + perUserRequestLimiter(md.ID(), c.ClientIP()) missingPrivileges := 0 for _, privilege := range privilegesNeeded {