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

Enable using scope.filteringPath() multiple times per scope #2242

Open
martinalbert opened this issue Nov 3, 2021 · 2 comments
Open

Enable using scope.filteringPath() multiple times per scope #2242

martinalbert opened this issue Nov 3, 2021 · 2 comments
Labels
support General questions or support.

Comments

@martinalbert
Copy link

martinalbert commented Nov 3, 2021

Context

I would like to use filteringPath() function multiple times per scope to filter multiple sensitive information from path, that are processed in different places of code. ( I also opened issue about matching recordings #2230, but filtering scopes solved it unless someone wants to use filtering multiple times ).

Every time scope.filteringPath() would be used, it would save filtered path, and work with transformed path in the next call.

Alternatives

I can merge these filtering functions and use it once, but users who uses our library will be able to filter his own information in recordings so if they use it, they would have to filter all credentials that we filter as well.

Has the feature been requested before?

No

If the feature request is accepted, would you be willing to submit a PR?

Yes

@gr2m
Copy link
Member

gr2m commented Nov 8, 2021

Would you mind sharing some code to demonstrate how the feature would look like compared to today?

our library

What's your library?

@gr2m gr2m added the support General questions or support. label Nov 8, 2021
@martinalbert
Copy link
Author

I've solve this by processing recordings before defining them and therefore not work with already defined scopes, but before, I was hoping it would be storing the state of filtered path once used, so in

scope.filteringPath('search', 'placeholder');
...
scope.filteringPath('another-search', 'placeholder')

scope after first call would replace 'search' for 'placeholder' in path and in second call, filtering would work with already replaced 'search' in path and add filtering on top of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support General questions or support.
Projects
None yet
Development

No branches or pull requests

2 participants