mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
initialize trustedCIDRs directly
directly initialization
This commit is contained in:
parent
c2e6c7ed9d
commit
c7e3b728fb
4
gin.go
4
gin.go
@ -183,12 +183,16 @@ func New() *Engine {
|
|||||||
trees: make(methodTrees, 0, 9),
|
trees: make(methodTrees, 0, 9),
|
||||||
delims: render.Delims{Left: "{{", Right: "}}"},
|
delims: render.Delims{Left: "{{", Right: "}}"},
|
||||||
secureJSONPrefix: "while(1);",
|
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.RouterGroup.engine = engine
|
||||||
engine.pool.New = func() interface{} {
|
engine.pool.New = func() interface{} {
|
||||||
return engine.allocateContext()
|
return engine.allocateContext()
|
||||||
}
|
}
|
||||||
|
<<<<<<< Updated upstream
|
||||||
_ = engine.parseTrustedProxies()
|
_ = engine.parseTrustedProxies()
|
||||||
|
=======
|
||||||
|
>>>>>>> Stashed changes
|
||||||
return engine
|
return engine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user