1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
FROM caddy:2.6.2-alpine
RUN apk update && apk add curl
RUN rm -rf /var/cache/apk/*
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY Caddyfile /etc/caddy/Caddyfile
COPY cert-event.sh /usr/bin/cert-event.sh
a. System environment:
docker
b. Command:
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane. -->
d. My complete Caddy config:
(json_log) {
log {
format filter {
wrap json
fields {
request>headers>Cf-Connecting-Ip rename cf_conn_ip
request>headers>Cf-Ipcountry rename cf_ip_country
request>headers>X-Forwarded-For rename x_forwarded_for
request>headers>User-Agent rename user_agent
request>uri rename uri
request>host rename host
request>proto rename proto
request>method rename method
tls delete
resp_headers delete
request>headers delete
}
}
}
}
3. The problem I’m having:
Log produced:
{"level":"error","ts":1671250922.0369964,"logger":"http.log.access.log1","msg":"handled request",
"request": {"remote_ip":"10.255.0.2","remote_port":"54232","proto":"HTTP/1.1","method":"GET","host":"readacted","uri":"/"},
"user_id":"","duration":0.00004171,"size":0,"status":404}
rename
fields are not present as expected.