Skip to content

Support for logging agent and url path for rejected requests #7085

@alex-aparin

Description

@alex-aparin

I have reverse proxy, which listens https traffic. I have sporadic rejected http requests and I wanted to check its url paths and agent. I turned on debug level of loggin, but it seems like Caddy still shows not big useful information.
Here is example of message:
{"level":"debug","ts":1750348626.2553515,"logger":"http.stdlib","msg":"http: TLS handshake error from 127.0.0.1:36262: client sent an HTTP request to an HTTPS server"}

I compared access logs with nginx, and it turns out that it can show such information out of box like that:

127.0.0.1 - - [19/Jun/2025:22:21:21 +0300] "GET /foo HTTP/1.1" 400 264 "-" "curl/7.81.0"

Is there any way to enable such feature? Maybe I missed something? standard message looks like default output from go tls framework

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions