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 custom request info #207

Closed
Djaler opened this issue Feb 21, 2018 · 2 comments
Closed

Add custom request info #207

Djaler opened this issue Feb 21, 2018 · 2 comments

Comments

@Djaler
Copy link

Djaler commented Feb 21, 2018

For example, in requests I recieve some secret token, and I don't want it to be in logs. So I obfuscate it. But by token I get some not-secret internal ID. It is stored in Spring Authentication. Can I somehow add it to log output?

@Djaler Djaler changed the title Add custom request infi Add custom request info Feb 21, 2018
@whiskeysierra
Copy link
Collaborator

https://github.com/zalando/logbook#filtering is primarily designed for obfuscation, but you can modify the request in any way you like. You could write your own (raw) request filter that sets that ID as a fake header, for example.

@Djaler
Copy link
Author

Djaler commented Feb 21, 2018

This is solve my problem, thank you!

@Djaler Djaler closed this as completed Feb 21, 2018
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