diff --git a/app/peppy_method.go b/app/peppy_method.go index e6c5780..639084f 100644 --- a/app/peppy_method.go +++ b/app/peppy_method.go @@ -10,7 +10,7 @@ import ( func PeppyMethod(a func(c *gin.Context, db *sql.DB)) gin.HandlerFunc { return func(c *gin.Context) { rateLimiter() - perUserRequestLimiter(0, c.Request.Header.Get("X-Real-IP")) + perUserRequestLimiter(0, c.ClientIP()) // I have no idea how, but I manged to accidentally string the first 4 // letters of the alphabet into a single function call.