From 18a98cb56e8619bfeef368dc80638d73f06e49ab Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 22 Jan 2022 01:14:37 +0800 Subject: [PATCH] fix: the trusted proxies should support ipv6 address by default --- gin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gin.go b/gin.go index 9bd4c46af6..30103c7cbd 100644 --- a/gin.go +++ b/gin.go @@ -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