2

In the multi-site Live Preview in admin panel show error in the console.

Failed to load http://www.example.local/test: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://www.example.test' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

1

Update

This has been implemented for the upcoming Craft 3.1 release.


Currently Live Preview will only work across sub-domains (i.e. site1.domain.com and site2.domain.com), not completely different domains (site1.com and site2.com) Here's a guide on how you'd set that up: https://craftcms.com/guides/using-live-preview-across-multiple-subdomains

In order for it to work across completely different domains, https://github.com/craftcms/cms/issues/1521 will need to be implemented.

| improve this answer | |
  • 2
    I am running Craft 3.1.18 and unable to use Live Preview on a multi Site. Admin url: domain.com/admin Site A: domain.com - working live preview Site B: domain.in - Error: Access to XMLHttpRequest at 'domain.in/?token=sv4HhcvPB8XScTzDXY-pJn-wboiyLR9T' from origin 'domain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'domain.com, *', but only one is allowed. – Mark Apr 11 '19 at 12:42
  • I'm having the same issue. Were you able to sort this? – mijewe Jun 3 '19 at 15:48
0

I have updated to craft 3.1.7 I can only see live preview on homepage of add on domain. Other entries do not have live preview available

| improve this answer | |

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.