title: How to enable CSP(Content Security Policy) in Jquery 3.4.1 & Jquery-ui 1.12.1?
body: <p>I'm currently using <strong>jQuery 3.4.1</strong> and <strong>jQuery-UI 1.12.1</strong> (for autocomplete) on my website.  I'm also using <code>unsafe-inline</code> and <code>unsafe-eval</code> which I don't want to use.</p>
  <p>My <code>&lt;meta/&gt;</code> tag:</p>
  <pre><code>&lt;meta
      http-equiv=&quot;Content-Security-Policy&quot;
      content=&quot;script-src 'self' 'unsafe-eval' https: cdnjs.cloudflare.com code.highcharts.com stackpath.bootstrapcdn.com cdn.jsdelivr.net code.jquery.com 'unsafe-inline'; connect-src 'self' news.google.com; worker-src 'self'; manifest-src 'self';&quot;
  &gt;
  </code></pre>
  <p>Expanded, that <code>content</code> is:</p>
  <pre class="lang-none prettyprint-override"><code>script-src
      'self'
      'unsafe-eval' 
      https: 
      cdnjs.cloudflare.com 
      code.highcharts.com 
      stackpath.bootstrapcdn.com 
      cdn.jsdelivr.net 
      code.jquery.com
      'unsafe-inline'; 
  
  connect-src
      'self'
      news.google.com;
  
  worker-src
      'self';
  
  manifest-src
      'self';
  </code></pre>
  <p>Whenever the AJAX call happens in jQuery-UI autocomplete, it throws an error saying it violates CSP policy.</p>
  <p>What do I need to do to properly enable CSP on my website with jQuery?  I don't want to use <code>unsafe-eval</code> and <code>unsafe-inline</code> on my website.</p>
  <p>Console Error:
  <a href="https://i.stack.imgur.com/HnPEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HnPEt.png" alt="Console error image" /></a></p>