CORS Issue - Annyone else getting this?
XMLHttpRequest cannot load https://api-ping.intercom.io/vjs/users/ping. No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is when using the script from inside angular instead of putting the script directly on the page.
Seems to be ok for me. Does the issue still happen for you? The Intercom ping endpoint always returns Access-Control-Allow-Origin: *, so there's no reason why it would be broken.
Yeah it's still happening. I'll do some more digging tomorrow. If I include the script normally in html it works but when I use async loading it throws that error. Thanks for getting back to me!
On Feb 28, 2016, at 11:02 AM, Wong Yong Jie [email protected] wrote:
Seems to be ok for me. Does the issue still happen for you? The Intercom ping endpoint always returns Access-Control-Allow-Origin: *, so there's no reason why it would be broken.
— Reply to this email directly or view it on GitHub.
Just a quick update the problem was I was sending a parameter called "companies" as a javascript list instead of company. For some reason this threw a CORS error and NOT a typical 500 response. One other question I have for you is secure mode found here, https://docs.intercom.io/configuring-intercom/enable-secure-mode
Do you plan on supporting this?
Thanks again!
Date: Sun, 28 Feb 2016 10:02:49 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [angular-intercom] CORS Issue - Annyone else getting this? (#30)
Seems to be ok for me. Does the issue still happen for you? The Intercom ping endpoint always returns Access-Control-Allow-Origin: *, so there's no reason why it would be broken.
— Reply to this email directly or view it on GitHub.
That's interesting - Secure mode is actually supported, you just have to send the user_hash as part of the user options.
$intercom.boot({
'user_hash': ...
... // Rest of user properties
});
You can generate the user_hash on the server-side.