I have incorporated Tawk.to's chat widget codes into my website to include the chat bubble. The code is placed within a JS file:
var Tawk_API = Tawk_API || {}, Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src = 'https://embed.tawk.to/xxxxxx/default';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
In my HTML file, I am including it as a <script>
. It functions properly. However, the problem arises when this code violates some of my website's Content Security Policies. Due to security reasons, I do not allow inline styling in my content security policies, and it seems that 'https://embed.tawk.to/xxxxxx/default' does contain some inline styling. Is there a solution to this issue without compromising my website's policy on inline styling?