Add option to ignore location data
In https://github.com/ropensci/rebird, which uses this plugin as a dependency, we'd like to remove IP-based location determination (see https://github.com/ropensci/rebird/issues/115). Part of the issue is that vcr logs requests and stores them. I wonder if there is a way to purge IP information from a request, too, or if this all needs to be done in ropensci/rebird.
Would it be possible to add an option to ignore parts of the request? Or, as one user put it:
Is there a way to hide IP addresses and coordinates in VCR the same way we hide the API key?
Thanks. If there is, I'd like to help document it here - I couldn't find a direct answer to that question in the README, although I may have missed something.
This may relate to #82.
Hi, thanks for reaching out @RichardLitt
The example shown in that issue using filter_sensitive_data and filter_sensitive_data _regex should do the trick, but if it's not I can help problem solve it.
Should I jump into the conversation here or on that issue in the rebird repo?
I logged an issue on this repo because I didn't want this to only be a support request. If the regex is the way to go, I would love help on the other repo; once that is done (and hopefully once I understand it!), I'd be happy to make a PR here to add the documentation needed to this repo to help others do this easier in the future. Then I think we could close this.
In terms of documentation, you mentioned the README. There's also:
- the configuration help page http://docs.ropensci.org/vcr/reference/vcr_configure.html#filtering
- the http testing book chapter https://books.ropensci.org/http-testing/vcr-security
I'd be happy to think about what would have made this information easier to find.
p.s., sort related to #82 , but actually just closed that as it'd not needed I don't think.
I'll pop into the other repo to try to help
Thanks. Something like a convenience function that just checks IP addresses might be useful. Or perhaps this could be added to https://books.ropensci.org/http-testing/vcr-security#other-security?
I don't think a function specifically for location data is in scope here, but It'd be great to add an example to docs using something like what you have in the rebird PR https://github.com/ropensci/rebird/pull/139/files#diff-7f2e95174665f9551b3dfe63739d8f3edd369e87029e3d7a553480b373824045R4-R9