Solvedangular Angular 8 upgradation - Error on Content Security Policy directive
โ๏ธAccepted Answer
I'm having the same issue. not a big fan of the answer above. this is a new issue that came as a direct result of upgrading to ver 8. so any hint or direction for action would be appreciated.
My code at least, is very standard and should not cause any issue:
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico">
Other Answers:
Having the same problem with exact same error when trying to serve with
ng serve --configuration=no
or any othe i18n transation having followed the documentation closely to set up i18n.
How is this not suitable as a bug report? The error prevents pages loading and the error message does not provide useful information to resolve the issue.
Come on! I also have this problem. any fix yet?
any updates?
Having the same problem after upgrading to Angular 8.
Reinstalled node modules, tried ng build (build was fine), modified tsconfig.json, nothing works.
EDIT: It worked! I had to naviagte to another uri. instead of localhost:xxxx, I needed to navigate to the baseHref given in the angular.json. So if you have somehow meddled with the baseHref (maybe not only in the angular.json, since there are multiple ways to change the baseHref) and routing of the app, then try navigating to localhost:xxxx/your/baseHref/here
Hi Team,
After upgrading to v8 getting bellow error. Other manual migration work and AOT errors all resolved .Could anyone please help to resolve this.
Refused to load the image 'http://localhost:4200/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.
Thank you!