I'm trying to use Workbox to add PWA functionality to my website. I'm following the Get Started guide, but I'm not getting far. When I run the website in Chrome I get the following error:
Refused to load the script 'https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'".
Per the docs, I am importing workbox-sw.js in my service worker file that is in my wwwroot folder with the following line:
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
The "Refused to load..." error occurs on that import statement.
How can I get rid of this error?