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

Feature request: log filter - request>remote_addr and common_log #4053

Closed
udf2457 opened this issue Mar 5, 2021 · 1 comment
Closed

Feature request: log filter - request>remote_addr and common_log #4053

udf2457 opened this issue Mar 5, 2021 · 1 comment

Comments

@udf2457
Copy link

udf2457 commented Mar 5, 2021

Hi,

Surely:

format filter {
    wrap json
    fields {
      request>remote_addr ip_mask {
        ipv4 24
        ipv6 32
      }
    }

Should also truncate the IP in the common_log part of the JSON output, otherwise its kind of pointless ? Maybe I'm missing something but what's the point of the default behaviour truncating remote_addr but not truncating common_log ?

I know I can take a hammer to the proverbial nail with common_log delete but that's not really the real answer to the problem, its more of a hack.

Also the docs (https://caddyserver.com/docs/caddyfile/directives/log#format-modules) should not really be making a suggestion for something that only half-works. Many people operating under GDPR jurisdiction will need a fully-functional IP truncating function, and the docs should not really be giving them false-hope of a "quick fix" if the IP is actually still left in the logs. The docs are silent on request>remote_addr ip_mask leaving the full IP in common_log (I note you previously promised enhancing the docs in this area #3837 .... obviously never happened since I just fell into the same trap despite looking in the section of the docs where I might have expected this to be made clear )

@mholt
Copy link
Member

mholt commented May 20, 2021

The plan is to remove common_log: see #4148.

This issue should be resolved by that.

@mholt mholt closed this as completed May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants