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

Add option for AbstractRequestLoggingFilter to blacklist certain headers #22244

Closed
nathan-me-lawrence opened this issue Jan 12, 2019 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@nathan-me-lawrence
Copy link

So issue SPR-14245 requested the ability to log all headers coming in with a request be added to AbstractRequestLoggingFilter.

There are sometime headers that it would be beneficial not to log. Such as Authorization headers containing jwt tokens.

It would be useful to be able to provide a blacklist of some headers which are then not appended to the log message builder.

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jan 18, 2019

We could probably add a Predicate<String> property for filtering header names.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 18, 2019
@rstoyanchev rstoyanchev added this to the 5.2 RC1 milestone Jan 18, 2019
@nathan-me-lawrence
Copy link
Author

Thats a much better idea than the one I had in mind. 😅

Updated my PR.

@rstoyanchev rstoyanchev self-assigned this Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants