Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport 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. |


grpc-gateway offers the possibility do define custom
outgoingHeaderMatcherto 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)