0

I keep getting error below even after trying out all of these.

  1. FXM.BaseHostDomain and and FXM.hostname
  2. https://kb.sitecore.net/articles/150778
  3. http://sitecoreinfo.blogspot.com.au/2017/09/sitecore-fxm-and-cors.html

Failed to load https://mainsite.azurewebsites.net/sitecore/api/ssc/Beacon/Service/beacon/trackPageVisit/?contactId=&sessionId=&page=https%3A%2F%2Ftargetsite.azurewebsites.net%2F&referrer=&rt=1526361067832: Redirect from 'https://mainsite.azurewebsites.net/sitecore/api/ssc/Beacon/Service/beacon/trackPageVisit/?contactId=&sessionId=&page=https%3A%2F%2Ftargetsite.azurewebsites.net%2F&referrer=&rt=1526361067832' to 'https://mainsite.azurewebsites.net/sitecore/api/ssc/beacon/service/beacon/trackpagevisit?contactId=&sessionId=&page=https%3A%2F%2Ftargetsite.azurewebsites.net%2F&referrer=&rt=1526361067832' has been blocked by CORS policy: 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 'https://targetsite.azurewebsites.net' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Anyone faced this issue and got around?

1

Manged to fix this issue by steps below:

  1. Make sure you get 200 response from this call. If you get 301, review your redirect rule which could be removing trailing slash. https://mainsiteazurewebsites.net/sitecore/api/ssc/Beacon/Service/beacon/trackPageVisit/?contactId=&sessionId=&page=https%3A%2F%2Ftargetsite.azurewebsites.net%2Ffamilies%3Fsubcat%3Dpregnancy&referrer=https%3A%2F%2Ftargetsite.azurewebsites.net%2F&rt=1526366632093
  2. And apply this custom header below: enter image description here

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.