splashlab / magento-2-cors-requests

Enabling cross-origin resource sharing (CORS) requests to Magento 2 API from configured Origin domain
Open Software License 3.0
69 stars 30 forks source link

Environment variables to override configuration settings don't work. #18

Closed DmitriyArbuzov closed 2 years ago

DmitriyArbuzov commented 4 years ago

CONFIGSTORESWEB is not working.

Please fix this by changing corsRequests to cors_requests in config.xml and other required files. So CONFIGSTORESWEBCORS_REQUESTS__ORIGIN_URL must work.

thaddeusmt commented 4 years ago

You are saying that a parameter path like 'web/corsRequests/origin_url' is no longer working, and the paths need to be 'web/cors_requests/origin_url' now?

Huh, was there an update in Magento core that makes this change necessary?

DmitriyArbuzov commented 4 years ago

I'm not sure that corsRequests have ever worked for environment variables to override configuration. In my case pattern corsRequests does not work and cors_requests works fine. I believe the valid pattern is with dash delimiter like cors_requests.

Horbarz commented 4 years ago

Please how do I edit the composer.json file, it seems to be a bit confusing

thaddeusmt commented 2 years ago

Since I am not working with Magento currently and have not been updating this extension, please check out graycoreio/magento2-cors to enable CORS on your Magento 2 site.

Hopefully it was built correctly so that environment variables can override configuration as you need here.