tawk.to widget flags content policy CORS warning

Developer
From United Kingdom
Member since May 2023

I have a look here:

https://github.com/litecart/litecart/blob/dev/public_html/includes/library/lib_document.inc.php#L19-L21

      header('Access-Control-Allow-Origin: '. document::ilink('')); // Only allow HTTP POST data from own domain

Ive tried fiddling with these lines but cant get it to work, i constantly get this error:

GET
https://embed.tawk.to/65b04ed70ff6374032c3f3ed/1hksb7u9u/default
CORS Missing Allow Origin

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://embed.tawk.to/65b04ed70ff6374032c3f3ed/1hksb7u9u/default. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.

Server is Nginx, i have no restrictions on nginx right now. Please let me know if anyone has a solution to this.

tim
Founder
From Sweden
Member since May 2013
tim

Isn't it the opposite? tawk.to needs to add this CORS header for your domain to be permitted to include their components in it. Usually done by Access-Control-Allow-Origin: *
Another option is to host the file yourself.

Those particular links gave me 404 errors.

You
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.