📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

606 Modules
385 Ready
218 Need Help
🏆 Leaderboard
Popular Module Stable vv2.1.1

Magento 2 CORS

graycore/magento2-cors

Enables configurable CORS Headers on GraphQL and REST APIs

473,814
Downloads
2x above avg
96
GitHub Stars
3x above avg
9mo ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
130 warnings
PHPStan Failed

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

vv2.1.1 on Magento 2.4.8-p3
Dec 15, 2025
vv2.1.1 on Magento 2.4.8-p2
Aug 14, 2025
vv2.1.1 on Magento 2.4.8
May 18, 2025
vv2.1.1 on Magento 2.4.7-p4
Apr 23, 2025
vv2.1.0 on Magento 2.4.7-p4
Feb 15, 2025
vv2.1.0 on Magento 2.4.7-p3
Oct 15, 2024

+7 older tests

Share This Module's Status

Magento 2 CORS Magento compatibility status badge

README

Loaded from GitHub

Magento 2 CORS

Packagist Downloads Packagist Version Packagist License MageCheck Status MageCheck Supported Version

Magento Version Support

Magento v2.3 Supported Magento v2.4 Supported

Ever try to work with the Magento GraphQL API or REST API from your browser and see the following?

Access 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.

This package allows you to securely add the necessary CORS headers to the Magento 2 GraphQL or REST APIs with ease.

Purpose

When building a headless application for Magento, or working with a client that respects the CORS protocol, you will need CORS headers on your backend resource.

This 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.

Getting Started

This module is intended to be installed with composer. From the root of your Magento 2 project:

  1. Download the package
composer require graycore/magento2-cors
  1. Configure the package
  2. Enable the package
./bin/magento module:enable Graycore_Cors

Features

Helpful Links

Upgrading

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.