1

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.

enter image description here

enter image description here

3
  • Did you added the environmental variable as well on XMCloud instance...SITECORE_Pages_Client_Host,SITECORE_Pages_CORS_Allowed_Origins and SITECORE_GRAPHQL_CORS
    – ckhanna
    Commented Aug 2 at 7:01
  • Please add console error in your question. Commented Aug 2 at 7:10
  • @VikrantPunwatkar added Commented Aug 12 at 17:18

3 Answers 3

0

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
0

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!!!

0

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.

2
  • I have added these settings. still not working Commented Aug 14 at 2:47
  • 1
    @JagmeetKaur is it possible to connect over Sitecore Slack...
    – ckhanna
    Commented Aug 14 at 5:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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