Skip to content

Commit

Permalink
Filter more known sensitive data for network test fixtures (#15518)
Browse files Browse the repository at this point in the history
* Filter more known sensitive data for network test fixtures

* Apply suggestions from code review

Co-authored-by: Florent Clarret <[email protected]>

---------

Co-authored-by: Florent Clarret <[email protected]>
  • Loading branch information
ofek and FlorentClarret authored Aug 9, 2023
1 parent d763d55 commit 0db16b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddev/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def network_replay(local_repo):
def add_cassette(relative_path, *args, **kwargs):
# https://vcrpy.readthedocs.io/en/latest/advanced.html#filter-sensitive-data-from-the-request
for option, known_values in (
('filter_headers', ['authorization']),
('filter_query_parameters', ['api_key', 'app_key']),
('filter_headers', ['authorization', 'dd-api-key', 'dd-application-key']),
('filter_query_parameters', ['api_key', 'app_key', 'application_key']),
('filter_post_data_parameters', ['api_key', 'app_key']),
):
defined_values = list(kwargs.setdefault(option, []))
Expand Down

0 comments on commit 0db16b2

Please sign in to comment.