Skip to content

Commit

Permalink
proxy protocol: improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Oct 31, 2024
1 parent bc31777 commit b4acae8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ func getProxyPolicy(allowed, skipped []func(net.IP) bool, def proxyproto.Policy)
}

if def == proxyproto.REQUIRE {
logger.Debug(logSender, "", "reject connection from ip %q: proxy protocol signature required and not set",
upstreamIP)
return proxyproto.REJECT, proxyproto.ErrInvalidUpstream
}
return def, nil
Expand Down

0 comments on commit b4acae8

Please sign in to comment.