dev-master
9999999-dev https://github.com/yireo-training/magento2-corshackMagento 2.3 module to add some hacks to GraphQL API
OSL-3.0
The Requires
- php >=7.0.0
The Development Requires
by Jisse Reitsma (Yireo)
composer-installer magento
Magento 2.3 module to add some hacks to GraphQL API
The new Magento 2 GraphQL system could be used with GraphQL clients
(like Apollo or even Axios) to fetch data from Magento. Most of these
clients use an HTTP request OPTIONS to see if CORS restrictions apply.
This module adds an OPTIONS check to the GraphQL API. Also, this module
adds Cross Origin headers (currently hard-coded to
http://localhost:3000
)., (*1)
composer require yireo-training/magento2-corshack ./bin/magento module:enable Yireo_CorsHack
Navigate to Advanced > Yireo CorsHack and add the schema + domain URL to the Origin Domain option., (*2)
By default, a wildcard (*
) is configured allowing all origin domains., (*3)
Examples of values that can be configured: - * - https://yireo.com - http://localhost - http://localhost:3000, (*4)
In general the configuration value includes schema and domain name. It also includes the port number if it is not standard., (*5)
Magento 2.3 module to add some hacks to GraphQL API
OSL-3.0
composer-installer magento