Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caddyhttp: Split up logged remote address into IP and port #4403

Merged
merged 1 commit into from Nov 29, 2021

Commits on Nov 29, 2021

  1. caddyhttp: Split up remote address into IP and port

    Closes #4396, related to #4148
    
    This is a breaking change, but we're already planning on removing  the`common_log` field as well at the same time, so might as well all do it together.
    
    In general, the remote IP is the useful part of the remote address. The port is rarely useful, because it only identifies ephemeral information about the connection from the client. But we were logging both in one field, so certain tooling that would want to only get the remote IP would need to split it up. Splitting is non-trivial, because of IPv4, IPv6, shenanigans. So it's best if we split it up-front before logging. If the log consumer actually cares about the remote port, it can re-assemble it.
    francislavoie committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    335b49f View commit details
    Browse the repository at this point in the history