Skip to content

Commit 87811a9

Browse files
authored
fix: the trusted proxies should support ipv6 address by default (#3033)
1 parent f1e9428 commit 87811a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func New() *Engine {
195195
trees: make(methodTrees, 0, 9),
196196
delims: render.Delims{Left: "{{", Right: "}}"},
197197
secureJSONPrefix: "while(1);",
198-
trustedProxies: []string{"0.0.0.0/0"},
198+
trustedProxies: []string{"0.0.0.0/0", "::/0"},
199199
trustedCIDRs: defaultTrustedCIDRs,
200200
}
201201
engine.RouterGroup.engine = engine

0 commit comments

Comments
 (0)