Проблема с политикой безопасности контента в приложении Angular - PullRequest
1 голос
/ 10 апреля 2020

Я работал над моим angular проектом. внезапно все мои выводы исчезли и консоль залила ошибками. кое-что я уменьшил ошибку с метатегами CSP, но все еще это не исправлено. Я получаю результат Cannot get /, и в консоли остается следующая ошибка, которая останавливает мое приложение.

5645ad61-4cf9-4577-9739-0269cce67fa6:110  - Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'none'". Either the 'unsafe-inline' keyword, a hash ('sha256-l7otoeLhnuXtvcAJGSPybnAM55G1LN6Ox3i/VSelamA='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback

Unchecked runtime.lastError: The message port closed before a response was received.

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.

Unchecked runtime.lastError: The message port closed before a response was received.

** Мой метатег **

<meta http-equiv="content-security-policy" content="sandbox; img-src 'self'; style-src 'self' ; script-src 'sha256-l7otoeLhnuXtvcAJGSPybnAM55G1LN6Ox3i/VSelamA='; connect-src 'self';" />
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...