I am following doc for connecting local to XM Cloud
https://doc.sitecore.com/xmc/en/developers/xm-cloud/connect-xm-cloud-pages-to-your-local-xm-instance.html
However, it is not working and giving some CORS console errors.
I am following doc for connecting local to XM Cloud
https://doc.sitecore.com/xmc/en/developers/xm-cloud/connect-xm-cloud-pages-to-your-local-xm-instance.html
However, it is not working and giving some CORS console errors.
Verify if below variables are available in .env
file if not please add below variables in .env
file and spin up the containers again.
SITECORE_Pages_Client_Host=https://pages.sitecorecloud.io
SITECORE_Pages_CORS_Allowed_Origins=pages.sitecorecloud.io
SITECORE_GRAPHQL_CORS=*.sitecorecloud.io
Ensure you're using the same browser where your login session for portal.sitecorecloud.io
is active.
Verify the following configurations in your .env
file:
SITECORE_Pages_Client_Host=https://pages.sitecorecloud.io
SITECORE_Pages_CORS_Allowed_Origins=pages.sitecorecloud.io
SITECORE_GRAPHQL_CORS=*.sitecorecloud.io
Once you've made these configuration changes, restart your instance.
Hope this helps!!!
The above issues looks to be appearing due to the missing of environmental variable inside your local XM Cloud
instance as below.
SITECORE_Pages_Client_Host=https://pages.sitecorecloud.io
SITECORE_Pages_CORS_Allowed_Origins=pages.sitecorecloud.io
SITECORE_GRAPHQL_CORS=*.sitecorecloud.io
You can add these environmental variables
inside your local env
file and spin up the containers again.
Hope this helps!!! Let me know in case you face any issues.