-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support WithOutgoingTrailerMatcher #1697
Comments
This sounds reasonable! A side note; we disabled headers altogether for clients that don't include the |
This sounds good, but it doesn't solve my use-case completely. I'd still like to have a outgoingTrailerMatcher. Reason: We are using the grpc-gateway to provide an external API for our grpc-based microservice architecture. So it acts as a single-point-of-entry and we must be careful about which internal information we want to expose. We use grpc-headers and trailers to transmit internal information between services, and their content should generally not be exposed via the http API. So even if the browser/user would send a "TE" header (request trailer data), I don't want to return any internal trailer information. |
Fair enough, sorry for hijacking this issue, I'll change the title and open a separate one for the bug I mentioned. |
🚀 Feature
grpc-gateway offers the possibility do define custom
outgoingHeaderMatcher
to decide which grpc-headers should be forwarded as http-headers via a ServeMuxOption. However, grpc trailer-headers are always forwarded in the http-trailers.In my case, I don't want to forward any grpc metadata to the http API. So I defined a headerMatcher that always returns false. But I can't do the same for trailers. It would be nice to have that possibility.
(As a side note: sending http trailers also removes the Content-Length Header from the response)
The text was updated successfully, but these errors were encountered: