Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Pulling my hair out with this one....
Access to XMLHttpRequest at 'https://mydomain/widgetrestapi/settings?vid=a13e1fa47b107e31c0de&hnh<LONG STRING>&theme=1' from origin 'https://mydomain' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
helperFunctions.js:164
GET https://mydomain/widgetrestapi/settings?vid=a13e1fa47b107e31c0de&hnh<LONG STRING>&theme=1 net::ERR_FAILED
I've tried adding into helperfunctions.js but not sure if ive missed something obvious...
[== JavaScript ==]
LINE 155+ request.setRequestHeader("Access-Control-Allow-Origin", "*");
Anyone ideas?
Last edited by srichards (2021-04-29 09:11:35)
Offline
Hi,
Yes you missed this one https://doc.livehelperchat.com/docs/ins … s-not-load
Offline
Hi remdex,
Thanks for this. I have added this in but i think the issue is REACT.
The widget works fine on non-react sites but the REACT site has the issue.
Is there any other way to use the snippet in REACT maybe NPM or something ?
Thanks
Offline
No this error is exactly related to CORS part. This .htaccess file has to be added .htaccess where index.php of lhc is located.
Offline
i have added .htaccess with the recommendations and the other websites with the widget work fine just not the REACT site.
I will keep trying....
Offline
react has nothing to do. Just google about CORS and what it means...
Offline
Pages: 1