Skip to content

[Faults] Add support for matching on the host/authority header. #700

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

Merged
merged 4 commits into from
Jul 14, 2025

Conversation

HiramSilvey
Copy link
Contributor

The PRs adding this to bpv2 have already been approved, and this PR is just to get bpv0 up-to-date with those.

This introduces support for a new h parameter in the fault configuration header value. Specifically, if the h parameter is present, then the value of it will be checked against the host/authority header of the outgoing request before determining whether the request matches for fault injection.

Note that this is not supported for gRPC due to the authority header not being exposed by client-middleware runtime. If you'd like more info on the workaround for gRPC, I'm happy to DM information on what we plan to do.

@HiramSilvey HiramSilvey changed the title Add support for matching on the host/authority header. [Faults] Add support for matching on the host/authority header. Jul 14, 2025
The PRs adding this to bpv2 have already been approved, and this PR is
just to get bpv0 up-to-date with those.

This introduces support for a new `h` parameter in the fault
configuration header value. Specifically, if the `h` parameter is
present, then the value of it will be checked against the
host/authority header of the outgoing request before determining
whether the request matches for fault injection.

Note that this is _not_ supported for gRPC due to the authority header
not being exposed by client-middleware runtime. If you'd like more
info on the workaround for gRPC, I'm happy to DM information on what
we plan to do.

Fix lint error
@HiramSilvey HiramSilvey marked this pull request as ready for review July 14, 2025 16:36
@HiramSilvey HiramSilvey requested a review from a team as a code owner July 14, 2025 16:36
@HiramSilvey HiramSilvey requested review from fishy, kylelemons and pacejackson and removed request for a team July 14, 2025 16:36
@kylelemons kylelemons requested review from scotthew1 and removed request for kylelemons July 14, 2025 16:57
@HiramSilvey HiramSilvey requested a review from fishy July 14, 2025 18:35
@HiramSilvey HiramSilvey requested a review from pacejackson July 14, 2025 18:40
Copy link
Contributor

@pacejackson pacejackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last small style suggestion

@HiramSilvey HiramSilvey requested a review from pacejackson July 14, 2025 18:46
@HiramSilvey HiramSilvey merged commit 9a57158 into reddit:master Jul 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants