Refused to load the image because it violates the following Content Security Policy directive (favicon)

后端 未结 11 993
别那么骄傲
别那么骄傲 2020-12-09 15:07

When I start the server I get the following error:

Refused to load the image \'http://localhost:4200/favicon.ico\' because it violates the following

11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 15:30

    I had the same problem under Linux Mint with Angular 9. Our project worked perfectly on MAC OS X and Windows. After assembling a new desktop and installing Linux I got the same error. All options like upgrade node version, angular version, delete node_modules did not solve the problem. On my machine, the problem was:

    !!! The path to the project contained special characters like: %20.

    That's because we use Microsoft TFS and the repository name contains spaces, which get translated into %20 and other characters... So if you are frustrated like me, check out your project path, maybe changing your path will fix the issue

提交回复
热议问题