I have a reverse proxy setup and I'm trying to 'link' access logs to upstream server events. What I've got so far is the following Caddy file:
localhost {
reverse_proxy {
to https://localhost:5000
header_up X-Request-Id "{http.request.uuid}"
transport http {
tls
tls_insecure_skip_verify
read_buffer 8192
}
}
log {
level info
# somehow include an additional field {..., requestId: "{http.request.uuid}"} in the log?
}
}
The HTTP server at https://localhost:5000 can read the incoming X-Request-Id header just fine. But how can I write the same request ID to the access log to link them together (for deeper analysis in case of upstream server errors)?
Perhaps someone knows a work-around for this issue?
I have a reverse proxy setup and I'm trying to 'link' access logs to upstream server events. What I've got so far is the following Caddy file:
The HTTP server at
https://localhost:5000can read the incomingX-Request-Idheader just fine. But how can I write the same request ID to the access log to link them together (for deeper analysis in case of upstream server errors)?Perhaps someone knows a work-around for this issue?