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

Filtering data based on keys not values #12

Open
bilfeldt opened this issue Nov 12, 2021 · 1 comment
Open

Filtering data based on keys not values #12

bilfeldt opened this issue Nov 12, 2021 · 1 comment

Comments

@bilfeldt
Copy link
Owner

It should be possible to provide an array of headers to filter, an array of query parameters to filter and body parameters to remove (last two could be combined to one payload array) - note that this can be individual for request and response:

Http::log([], // No context added
    [
        'filter_request_headers' => [
            'user-agent',
        ],
        'filter_request_payload' => [
            'apitoken', // remove any "apitoken" provided in either request json or query
        ],
        'filter_response_payload' => [
            'data.*.base64_pdf',
        ],
    ]
)->get(...)
@bilfeldt
Copy link
Owner Author

I suggest using a dedicated logger using logWith and the new MessageAccessor that were both introduced in v1.1.0 - see #13 and #15

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

1 participant