-
Notifications
You must be signed in to change notification settings - Fork 117
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
mux: forward X- headers #1264
mux: forward X- headers #1264
Conversation
RE comment - want to double check that we should append the grpcgateway prefex to the If so, I noticed something interesting locally in which the context metadata list had both Might not be an issue but wanted to raise. |
side note: curious about clutch/backend/middleware/authn/authn.go Line 101 in 83c47c8
|
re: for |
ah got it, thanks! yep will get appended 2x, so list will have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! 🚢
164c797
to
ecb1f24
Compare
Description
Background:
By default, http request headers are passed to gRPC context via the DefaultHeaderMatcher rule. If the request headers don't meet certain preconditions, they are dropped.
Solution:
PR adds a custom header rule so that
X-
request headers are forwarded (and prefixed withgrpcgateway
). All other headers will be checked by the DefaultHeaderMatcher rule.Use case for this change:
For the slackbot work, we need to verify a request came from Slack by certain
X-
request headers sent in the request.Testing Performed
Unit test and locally with #1250