0

In Magento Cloud hosting, how to add following configuration,

Header set Access-Control-Allow-Origin a.com

When I login to Magento Cloud I have only read access to the server files. Is there a way to do this.?

  • if your server settings and files are managed by someone else , there is no point in this question here, ask your hosting support. – MagenX Feb 26 '18 at 9:15
-1

With Magento Cloud, depending on whether the environment you are looking at has Fastly or not, there could be different solutions.

Global solution
You can use Magento itself to set that header - by creating an extension to set the desired header on all/some of the responses.

NGINX solution
I believe the engineering team can help by raising a support ticket to instruct them to config the NGINX instruction to set this header.

Fastly solution
This is only applicable if the environment you are referring to has Fastly integrated. Since we don’t have direct access to out Fastly account. You will have to config the add header instruction into custom VCL yourself via API call with provided Fastly API credentials. Or raise a support ticket with Magento Cloud to help you setting this custom VCL.

More information regarding Fastly configuration API: https://docs.fastly.com/api/config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.