proxy protocol: improve logging
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
CI / Test and deploy (push) Has been cancelled
CI / Test build flags (push) Has been cancelled
CI / Test with PgSQL/MySQL/Cockroach (push) Has been cancelled
CI / Build Linux packages (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Docker / Build (push) Has been cancelled

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-10-31 14:30:49 +01:00
parent bc317775d2
commit b4acae85b8
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -831,6 +831,8 @@ func getProxyPolicy(allowed, skipped []func(net.IP) bool, def proxyproto.Policy)
} }
if def == proxyproto.REQUIRE { 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 proxyproto.REJECT, proxyproto.ErrInvalidUpstream
} }
return def, nil return def, nil