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

Narrow GrpcWebMiddleware rules to only rewrite POST requests #1618

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Feb 21, 2022

User reporting an issue when combing gRPC-Web with CORS - dotnet/AspNetCore.Docs#25046

I'm not sure how they interfere with each other. gRPC-Web middleware should only trigger when content-type = "application/grpc-web".

My only theory is content-type is incorrectly being set on OPTIONS preflight request. This PR updates middleware to only modify the request when it a POST (all gRPC requests are POST)

@JamesNK JamesNK merged commit 7057da7 into grpc:master Feb 22, 2022
@JamesNK JamesNK deleted the jamesnk/grpcwebpost branch February 22, 2022 04:01
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.

None yet

2 participants