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.?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
With Magento Cloud, depending on whether the environment you are looking at has Fastly or not, there could be different solutions.
You can use Magento itself to set that header - by creating an extension to set the desired header on all/some of the responses.
I believe the engineering team can help by raising a support ticket to instruct them to config the NGINX instruction to set this header.
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