Хорошего дня! Я создаю простое веб-приложение. Но я не могу связать внешний скрипт или css из-за полиции CSP.
Refused to load the stylesheet 'https://cdn.plyr.io/3.5.10/plyr.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
Я искал какое-то решение и вставил этот метатег в head
тег, но он все тот же.
<meta http-equiv="Content-Security-Policy" content="default-src *;">
Извините, мой английский sh плох, поэтому я могу Объясните это ясно. Кроме того, вот полный шаблон:
<!doctype html>
<html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}>
<head>
<meta charset="UTF-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
{if isset($description)}
<meta name="description" content="{$description|escape}" />
<meta name="twitter:description" content="{$description|escape}" />
<meta property="og:description" content="{$description|escape}" />
{/if}
<link rel="stylesheet" href="{base_url}/css/fonts.css" />
<link rel="stylesheet" href="{base_url}/css/style.css" />
<title>{$config->appName}{if isset($title)} - {$title|escape}{/if}</title>
<link rel="canonical" href="{$canonical}" />
<link rel="icon" href="{base_url}/img/favicon.png" />
<meta property="og:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
<meta property="og:image" content="{base_url}/img/logo.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
<meta name="twitter:image" content="{base_url}/img/logo.png" />
<meta name="twitter:creator" content="@_quangthang" />
<meta name="theme-color" content="#4F4F4F">
<link rel="manifest" href="{base_url}/resources/manifest.json" />
<meta http-equiv="Content-Security-Policy" content="default-src *;">
<link rel="stylesheet" href="https://cdn.plyr.io/3.5.10/plyr.css" />
</head>
<body class="{$class}">
Спасибо за помощь!