fix: the trusted proxies should support ipv6 address by default

This commit is contained in:
Eric 2022-01-22 01:14:37 +08:00
parent 580e7da6ee
commit 18a98cb56e

2
gin.go
View File

@ -189,7 +189,7 @@ func New() *Engine {
trees: make(methodTrees, 0, 9),
delims: render.Delims{Left: "{{", Right: "}}"},
secureJSONPrefix: "while(1);",
trustedProxies: []string{"0.0.0.0/0"},
trustedProxies: []string{"0.0.0.0/0", "::/0"},
trustedCIDRs: defaultTrustedCIDRs,
}
engine.RouterGroup.engine = engine