-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix request cache when filtering sensitive params. #34
Conversation
This pull request filters the URL logged, but it uses the URL (with sensitive URL params) as cache key. Maybe a more correct fix is to only use URL with sensitive data when doing a request to Google's API, but as cache key and when logging we'll use the filtered one. What do you think, @aceunreal? |
Hopefully makes it really clear which URL is which.
I think I'll push the code in the direction where we have a Maybe we we could hash the |
In case you want to keep old behaviour you may set it to a block passing url through.
This fixes an issue where filtering the URL actually mutated the given URL string. That string was also used as a cache key, but it didn't hit the cache as the string was mutated.
Fixes #32
PS. There are
somea lot of rubocop related changes in this pull request as well as the fix. Sorry for that, but I didn't spend time keeping the rubocop commits separate from the fix.