mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-21 17:37:04 +08:00
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@ -767,8 +767,6 @@ func (c *Context) RemoteIP() (net.IP, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
trustedCIDRs, _ := c.engine.prepareTrustedCIDRs()
|
||||
c.engine.trustedCIDRs = trustedCIDRs
|
||||
if c.engine.trustedCIDRs != nil {
|
||||
for _, cidr := range c.engine.trustedCIDRs {
|
||||
if cidr.Contains(remoteIP) {
|
||||
|
Reference in New Issue
Block a user