I'm currently attempting to not log or redact a header value called 'request_Secret' using the following configuration:
accessLog:
format: json
filePath: "/dev/stdout"
fields:
defaultMode: keep
names:
request_Secret: drop
headers:
defaultMode: keep
names:
request_Secret: drop
However, traefik continues to log the header and value.
I've tried using redact instead with no luck. I've tried using this in just the fields or just the 'headers' sections (what is the difference???) without success.
OK, that's a bit clearer on fields and headers - thank you. What spelling are you referring to? If it's the header name, yes, it's correct. I've tried as shown above and all lowercase, just in case.
Resolved this. The header I was trying to remove or redact was called Secret, but the logs were showing request_Secret so that's the header name I used in the configuration. Now I've dropped the request_ prefix it's works just fine. This works;