Skip to content

Commit

Permalink
fix: permissions denied should now return the client ip
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilSeligmann committed Jun 5, 2022
1 parent 89b8d3e commit 61307c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 61307c9

Please sign in to comment.