Skip to content
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

Set X-User-Agent in gRPC-Web clients #572

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Set X-User-Agent in gRPC-Web clients #572

merged 1 commit into from
Aug 25, 2023

Conversation

akshayjshah
Copy link
Member

The gRPC-Web pseudo-specification isn't totally clear, but it sounds
like it requires setting X-User-Agent instead of User-Agent as a
part of the protocol. This makes sense in browsers, where JS can't set
User-Agent, but it's very odd for backend clients. This PR proposes
splitting the difference and setting both headers.

The gRPC-Web pseudo-specification isn't totally clear, but it sounds
like it requires setting `X-User-Agent` instead of `User-Agent` as a
part of the protocol. This makes sense in browsers, where JS _can't_ set
`User-Agent`, but it's very odd for backend clients. This PR proposes
splitting the difference and setting both headers.
@akshayjshah akshayjshah requested review from jhump and timostamm August 25, 2023 03:12
Copy link
Member

@timostamm timostamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR proposes splitting the difference and setting both headers.

Setting both headers seems to be the consequence for a non-browser client.

@akshayjshah akshayjshah merged commit 77e6f66 into main Aug 25, 2023
@akshayjshah akshayjshah deleted the ajs/ua branch August 25, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants