Refused to load the script because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'
<p>I am using MVC6 (asp.net 5) using angular and trying to load scripts from CDN locations when my code is running in release mode, but for some reason the scripts NEVER load.</p>

<p>I have read that you need to add a meta tag to your HTML file, which I have done, like so.</p>

<pre><code>&lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; style-src 'self' https://ajax.aspnetcdn.com; font-src 'self' http://netdna.bootstrapcdn.com" /&gt;
</code></pre>

<p>And on my Index.cshtml, I have got this.</p>

<pre><code>&lt;environment names="Staging,Production"&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js"
        asp-fallback-src="~/lib/angular/angular.min.js"
        asp-fallback-test="window.angular"&gt;
    &lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js"
        asp-fallback-src="~/lib/angular-ui-router/release/angular-ui-router.js"
        asp-fallback-test="window.angular &amp;&amp; window.angularUiRouter"&gt;
    &lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular-local-storage/0.2.2/angular-local-storage.min.js"
        asp-fallback-src="~/lib/angular-local-storage/dist/angular-local-storage.js"
        asp-fallback-test="window.angular &amp;&amp; window.localStorage"&gt;
    &lt;/script&gt;
</code></pre>

<p>But they never load.  I have tried running the code using IISExpress and also using the <code>DNX Web</code> command.</p>

<p>I have <a href="https://stackoverflow.com/questions/30280370/how-does-content-security-policy-work">this</a> post which is how I come to creating the META tag, but not sure why it's not working.  I have tried this in Chrome, and under the console, I just get errors like so</p>

<p><a href="https://i.stack.imgur.com/XivAV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XivAV.png" alt="enter image description here"></a></p>