Skip to content

Commit

Permalink
initialize trustedCIDRs directly
Browse files Browse the repository at this point in the history
directly initialization
  • Loading branch information
Bisstocuz committed Sep 22, 2021
1 parent c2e6c7e commit c7e3b72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,16 @@ func New() *Engine {
trees: make(methodTrees, 0, 9),
delims: render.Delims{Left: "{{", Right: "}}"},
secureJSONPrefix: "while(1);",
trustedCIDRs: []*net.IPNet{{IP: net.IP{0x0, 0x0, 0x0, 0x0}, Mask: net.IPMask{0x0, 0x0, 0x0, 0x0}}},
}
engine.RouterGroup.engine = engine
engine.pool.New = func() interface{} {
return engine.allocateContext()
}
<<<<<<< Updated upstream
_ = engine.parseTrustedProxies()
=======
>>>>>>> Stashed changes
return engine
}

Expand Down

0 comments on commit c7e3b72

Please sign in to comment.