use c.ClientIP() rather than manually accessing c.Request.RemoteAddr

This commit is contained in:
Howl 2016-07-06 19:35:49 +02:00
parent 45d0de234b
commit 15559d0be2

View File

@ -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 missingPrivileges := 0
for _, privilege := range privilegesNeeded { for _, privilege := range privilegesNeeded {