Eliminate custom header x-grpc-web
See original GitHub issueAs far as I can tell, there is no actual functional purpose for the header x-grpc-web
, aside from a vanity bump that it is possible to detect use of Improbable’s gRPC web client.
Why is the header added? Of course there are significant problems with this approach. If gRPC web is being used cross-domain, the x-grpc-web
header must be included in the Access-Control-Allow-Headers response. And, naturally, the custom header triggers a CORS pre-flight which costs an entire HTTP round-trip, and is a head-of-line blocker for initial calls to the server.
So, here is my question:
- Why was this header added in the first place?
- Perhaps related to point 1, does this header actually trigger any functionality? Is it triggered when using Improbable’s server side tools, or all gRPC servers?
- Why can’t it be disabled, since the library works fine if the header is eliminated?
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Customizing your gateway | gRPC-Gateway - GitHub Pages
gRPC -Gateway Documentation Website. ... Write a custom implementation of Marshaler . ... Mapping from HTTP request headers to gRPC client metadata.
Read more >Set headers for grpc-web call - Stack Overflow
I have a method for setting metadata in my client. private async Task<Metadata> SetMetadata() { //More stuff here headers.Add("Transfer-Encoding ...
Read more >gRPC over HTTP2
Request-Headers are delivered as HTTP2 headers in HEADERS + CONTINUATION frames. Request-Headers → Call-Definition *Custom-Metadata; Call-Definition → Method ...
Read more >Avoiding deserialization - Google Groups
In our app we need to accept a (large) Grpc message, extract a field, and then based on the value of that field...
Read more >gRPC-web: Using gRPC in Your Front-End Application - Torq
Learn how to use gRPC-web to communicate to your gRPC backend with examples and ... expose_headers: custom-header-1,grpc-status,grpc-message.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Works for me (although it would be 0.9.0)
On Wed, 6 Feb 2019, 17:39 Johan Brandhorst <notifications@github.com wrote:
Closing this issue in favor of #346; to summarise, our plan is to remove the
x-grpc-web
header from the client.