Skip to content

Commit

Permalink
Fix deprecation for conn policy
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed Jan 8, 2025
1 parent c7a5a7c commit 1cdff5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func LoadProxyProtoConfig(l *proxyproto.Listener) {
if viper.GetBool("proxy-protocol-use-timeout") {
l.ReadHeaderTimeout = viper.GetDuration("proxy-protocol-timeout")

l.Policy = func(upstream net.Addr) (proxyproto.Policy, error) {
l.ConnPolicy = func(connPolicyOptions proxyproto.ConnPolicyOptions) (proxyproto.Policy, error) {
switch viper.GetString("proxy-protocol-policy") {
case "ignore":
return proxyproto.IGNORE, nil
Expand Down

0 comments on commit 1cdff5a

Please sign in to comment.