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(grpc-web): don't override Access-Control-Allow-Origin header in response #6842

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

tzssangglass
Copy link
Member

@tzssangglass tzssangglass commented Apr 14, 2022

Description

Fixes #6834

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@tzssangglass tzssangglass changed the title fix(grpc-web): don't override Access-Control-Allow-Origin header in r… fix(grpc-web): don't override Access-Control-Allow-Origin header in response Apr 14, 2022
@HalilOzkan
Copy link

I think we should also respect and don't override all CORS headers in the grpc-web plugin if already set by the CORS plugin

@tzssangglass
Copy link
Member Author

tzssangglass commented Apr 15, 2022

I think we should also respect and don't override all CORS headers in the grpc-web plugin if already set by the CORS plugin

yes, this is how this PR is handled.

According to the grpc-web requirements for CORS: https://github.com/grpc/grpc-web/blob/master/doc/browser-features.md#cors-support

Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers is clear, I understand what you mean, the cors plugin may have more precise control over the three header.

@spacewander spacewander merged commit d6a4afd into apache:master Apr 15, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request May 20, 2022
@tzssangglass tzssangglass deleted the Issue6834 branch May 24, 2022 06:25
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request May 27, 2022
spacewander pushed a commit to spacewander/incubator-apisix that referenced this pull request May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants