Fix IP source in logs
The most interesting data point in the log message is the proxy's IP, but having the client IP too can help identify integration issues.
This commit is contained in:
parent
3bc775b5de
commit
ee62ddd00b
|
@ -205,7 +205,7 @@ func UsernameFromReverseProxyHeader(r *http.Request) string {
|
|||
return ""
|
||||
}
|
||||
if !validateIPAgainstList(reverseProxyIp, conf.Server.ReverseProxyWhitelist) {
|
||||
log.Warn(r.Context(), "IP is not whitelisted for reverse proxy login", "ip", r.RemoteAddr)
|
||||
log.Warn(r.Context(), "IP is not whitelisted for reverse proxy login", "proxy-ip", reverseProxyIp, "client-ip", r.RemoteAddr)
|
||||
return ""
|
||||
}
|
||||
username := r.Header.Get(conf.Server.ReverseProxyUserHeader)
|
||||
|
|
Loading…
Reference in New Issue