debug: log host / path
to help understand why the ingress rule logged is being selected. in addition, combine "Request Headers..." and "Serving with ingress..." logs into this updated log. Co-authored-by: Silver <sssilver@users.noreply.github.com>
This commit is contained in:
parent
aca0c93461
commit
f3b0b33dc5
|
@ -238,8 +238,13 @@ func (p *proxy) logRequest(r *http.Request, fields logFields) {
|
||||||
} else {
|
} else {
|
||||||
p.log.Debug().Msgf("All requests should have a CF-RAY header. Please open a support ticket with Cloudflare. %s %s %s ", r.Method, r.URL, r.Proto)
|
p.log.Debug().Msgf("All requests should have a CF-RAY header. Please open a support ticket with Cloudflare. %s %s %s ", r.Method, r.URL, r.Proto)
|
||||||
}
|
}
|
||||||
p.log.Debug().Msgf("CF-RAY: %s Request Headers %+v", fields.cfRay, r.Header)
|
p.log.Debug().
|
||||||
p.log.Debug().Msgf("CF-RAY: %s Serving with ingress rule %v", fields.cfRay, fields.rule)
|
Str("CF-RAY", fields.cfRay).
|
||||||
|
Fields(r.Header).
|
||||||
|
Str("host", r.Host).
|
||||||
|
Str("path", r.URL.Path).
|
||||||
|
Interface("rule", fields.rule).
|
||||||
|
Msg("Inbound request")
|
||||||
|
|
||||||
if contentLen := r.ContentLength; contentLen == -1 {
|
if contentLen := r.ContentLength; contentLen == -1 {
|
||||||
p.log.Debug().Msgf("CF-RAY: %s Request Content length unknown", fields.cfRay)
|
p.log.Debug().Msgf("CF-RAY: %s Request Content length unknown", fields.cfRay)
|
||||||
|
|
Loading…
Reference in New Issue