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

Fix setting user-agent in client when running in the browser #1165

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 10, 2021

@JamesNK JamesNK requested a review from JunTaoLuo January 11, 2021 22:15

private OperatingSystem()
{
IsBrowser = RuntimeInformation.IsOSPlatform(OSPlatform.Create("browser"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, I didn't know it was possible to create a "browser" OS platform and it'll just work.

@JamesNK JamesNK changed the title Fix setting user-agent in .NET client when running in the browser Fix setting user-agent in client when running in the browser Jan 12, 2021
@JamesNK JamesNK merged commit e34cef6 into grpc:master Jan 12, 2021
@JamesNK JamesNK deleted the jamesnk/grpcweb-browser-header-fix branch January 12, 2021 05:17
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.

grpc-dotnet + Blazor sets Safari and Firefox User-Agent to "grpc-dotnet/$assemblyVersion"
2 participants