question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Eliminate custom header x-grpc-web

See original GitHub issue

As 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:

  1. Why was this header added in the first place?
  2. 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?
  3. Why can’t it be disabled, since the library works fine if the header is eliminated?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jonnyreevescommented, Feb 6, 2019

Works for me (although it would be 0.9.0)

On Wed, 6 Feb 2019, 17:39 Johan Brandhorst <notifications@github.com wrote:

Thanks for confirming Marcus, I’m tempted to say we shouldn’t bother and just remove it with a major version bump (0.8.0). Any objections?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/improbable-eng/grpc-web/issues/325#issuecomment-461115545, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMN-YoAoSV4RMAQpULdwucNGXrWrHb6ks5vKxM5gaJpZM4ajter .

0reactions
jonny-improbablecommented, Feb 15, 2019

Closing this issue in favor of #346; to summarise, our plan is to remove the x-grpc-web header from the client.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found