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

shouldLogRequestHeader and shouldLogResponseHeader is not enough to control headers log in FULL mode #2586

Open
peterszatmary opened this issue Oct 6, 2024 · 0 comments

Comments

@peterszatmary
Copy link

There is an implementation to control request and response headers with shouldLogRequestHeader and shouldLogResponseHeader.

It's working for logs but …

There is a line in the implementation which logs the whole response body also with headers.

I would also like to control these headers. Filter out particular headers in that particular log.

I am using FULL logging and debug mode.

The reason why I filter out the headers is to avoid security sensitive headers like tokens etc.

I would like to see that shouldLogResponseHeader is controlling also this line of the log too without any other implementation.

Here is how the log looks like

-10-04T10:36:50.206+02:00 DEBUG 131409 --- [demo] [           main] feign.Logger                             : [Client#get] {

  "args": {},

  "headers": {

    "Accept": "*/*",

    "Host": "[httpbin.org](http://httpbin.org/)",

    "User-Agent": "Java/21.0.1",

    "X-Amzn-Trace-Id": "Root=1-66ffa922-324f4c83482b70b4579853ac"

  },

  "origin": "88.212.19.236",

  "url": "https://httpbin.org/get"
}
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

1 participant