From 61307c910fbf2d8f5352baabaa5a1209a6d82454 Mon Sep 17 00:00:00 2001 From: Neil Seligmann Date: Sun, 5 Jun 2022 15:30:13 -0300 Subject: [PATCH] fix: permissions denied should now return the client ip --- web/middleware.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/middleware.go b/web/middleware.go index f6d271c..1caa515 100644 --- a/web/middleware.go +++ b/web/middleware.go @@ -12,9 +12,9 @@ func IPWhiteList(whitelist map[string]bool) gin.HandlerFunc { c.AbortWithStatusJSON(http.StatusForbidden, gin.H{ "status": http.StatusForbidden, "message": "Permission denied, address not in whitelist.", - "data": { - "clientIp": c.ClientIP() - } + "data": gin.H{ + "clientIp": c.ClientIP(), + }, }) return }