{"id":13733933,"url":"https://github.com/graycoreio/magento2-cors","last_synced_at":"2026-02-27T21:14:55.267Z","repository":{"id":40533509,"uuid":"195814560","full_name":"graycoreio/magento2-cors","owner":"graycoreio","description":"A Magento 2 module that enables configurable CORS Headers on the GraphQL and REST APIs","archived":false,"fork":false,"pushed_at":"2025-12-19T15:04:56.000Z","size":512,"stargazers_count":97,"open_issues_count":0,"forks_count":33,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-21T16:26:42.544Z","etag":null,"topics":["cors","cors-headers","cors-protocol","graphql","hacktoberfest","magento","magento2","magento2-extension","magento2-module","php","rest"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/graycore/magento2-cors","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graycoreio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"graycoreio"}},"created_at":"2019-07-08T13:11:11.000Z","updated_at":"2026-01-10T05:02:50.000Z","dependencies_parsed_at":"2024-01-11T20:47:16.275Z","dependency_job_id":"2b913a8b-f1d4-4d8c-a839-98127bb711c5","html_url":"https://github.com/graycoreio/magento2-cors","commit_stats":{"total_commits":102,"total_committers":6,"mean_commits":17.0,"dds":"0.17647058823529416","last_synced_commit":"cff109b33fa8bd6a64322a8c11e772192ec952f7"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/graycoreio/magento2-cors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-cors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-cors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-cors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-cors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graycoreio","download_url":"https://codeload.github.com/graycoreio/magento2-cors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-cors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29914300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cors","cors-headers","cors-protocol","graphql","hacktoberfest","magento","magento2","magento2-extension","magento2-module","php","rest"],"created_at":"2024-08-03T03:00:51.051Z","updated_at":"2026-02-27T21:14:55.262Z","avatar_url":"https://github.com/graycoreio.png","language":"PHP","funding_links":["https://github.com/sponsors/graycoreio"],"categories":["Open Source Extensions"],"sub_categories":["Development Utilities"],"readme":"# Magento 2 CORS\n\n\u003cdiv align=\"center\"\u003e\n\n[![Packagist Downloads](https://img.shields.io/packagist/dm/graycore/magento2-cors?color=blue)](https://packagist.org/packages/graycore/magento2-cors/stats)\n[![Packagist Version](https://img.shields.io/packagist/v/graycore/magento2-cors?color=blue)](https://packagist.org/packages/graycore/magento2-cors)\n[![Packagist License](https://img.shields.io/packagist/l/graycore/magento2-cors)](https://github.com/graycoreio/magento2-cors/blob/master/LICENSE)\n[![MageCheck Status](https://img.shields.io/github/actions/workflow/status/graycoreio/magento2-cors/check-extension.yaml?\u0026label=MageCheck\u0026labelColor=1a1a1a)](https://github.com/graycoreio/magento2-cors/actions/workflows/check-extension.yaml)\n![MageCheck Supported Version](https://img.shields.io/badge/currently_supported-any?label=MageCheck%20Supported\u0026labelColor=1a1a1a\u0026color=090c9b)\n\n\n\u003c/div\u003e\n\n\n## Magento Version Support\n![Magento v2.3 Supported](https://img.shields.io/badge/Magento-2.3-brightgreen.svg?labelColor=2f2b2f\u0026logo=magento\u0026logoColor=f26724\u0026color=464246\u0026longCache=true\u0026style=flat)\n![Magento v2.4 Supported](https://img.shields.io/badge/Magento-2.4-brightgreen.svg?labelColor=2f2b2f\u0026logo=magento\u0026logoColor=f26724\u0026color=464246\u0026longCache=true\u0026style=flat)\n\nEver try to work with the Magento GraphQL API or REST API from your browser and see the following?\n\n```txt\nAccess to XMLHttpRequest at 'https://my.magento.app' from origin 'http://my.webapp.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.\n```\n\nThis package allows you to securely add the necessary CORS headers to the Magento 2 GraphQL or REST APIs with ease.\n\n## Purpose\nWhen building a headless application for Magento, or working with a client that respects the CORS protocol, you will need [CORS headers](https://fetch.spec.whatwg.org/#http-cors-protocol) on your backend resource.\n\nThis package will add configurable CORS Resource headers to the Magento 2 GraphQL or REST APIs, allowing you to access the GraphQL or REST APIs from your browser.\n\n## Getting Started\nThis module is intended to be installed with [composer](https://getcomposer.org/). From the root of your Magento 2 project:\n\n1. Download the package\n```bash\ncomposer require graycore/magento2-cors\n```\n2. [Configure the package](/docs/stories/configuring-the-headers.md)\n3. Enable the package\n\n```bash\n./bin/magento module:enable Graycore_Cors\n```\n\n## Features\n* [Configurable](./docs/stories/configuring-the-headers.md)\n* [Respects the full CORS Protocol](https://fetch.spec.whatwg.org/#http-cors-protocol)\n    * `Access-Control-Allow-Origin`\n    * `Access-Control-Allow-Methods`\n    * `Access-Control-Allow-Headers`\n    * `Access-Control-Max-Age`\n    * `Access-Control-Expose-Headers`\n    * `Access-Control-Allow-Credentials`\n\n* [Security By Default](./docs/stories/security.md#security-by-default)\n* [Vary: Origin](https://fetch.spec.whatwg.org/#cors-protocol-and-http-caches)\n## Helpful Links\n* [FAQ](./docs/faq/faqs.md)\n    * [Can I configure this from the admin panel?](./docs/faq/faqs.md#can-i-configure-this-from-the-admin-panel)\n\n## Upgrading\n* [Semver Policy](https://semver.org/)\n* [Guide](./docs/upgrading/guide.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraycoreio%2Fmagento2-cors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraycoreio%2Fmagento2-cors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraycoreio%2Fmagento2-cors/lists"}