magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.58k stars 9.32k forks source link

[EY] Support CORS for GraphQL #31195

Open magento-engcom-team opened 3 years ago

magento-engcom-team commented 3 years ago

As a web developer, I want Magento to support the CORS standard:

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

so that I can develop my applications according to defined best practices. 

Use env for settings not system config

Other Issues:

Related issue: https://github.com/magento/magento2/issues/28561 (original issue: https://github.com/magento/magento2/issues/8399)

Acceptance Criteria:

Implement CORS support as detailed here: https://enable-cors.org/server.html

magento-engcom-team commented 3 years ago

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-39743

m2-assistant[bot] commented 3 years ago

Hi @magento-engcom-team. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 2 years ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 2 years ago

CORs support for GraphQl is not available in Magento which is the existing behavior of Magento. Hence considering this as feature request. However this (package)[https://github.com/graycoreio/magento2-cors] allows you to securely add the necessary CORS headers to the Magento 2 GraphQL or REST APIs with ease.