[英]Content-Security-Policy errors
在閱讀了多個網站后,到目前為止沒有任何工作可以讓我使用這個引導模板: https : //github.com/StartBootstrap/startbootstrap-freelancer
我什至添加了元標記,但錯誤變得更糟,我做錯了什么?
<meta
http-equiv="Content-Security-Policy"
content="style-src 'self' https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css 'unsafe-inline';"
/>
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' use.fontawesome.com 'unsafe-inline';"
/>
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' code.jquery.com 'unsafe-inline';"
/>
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' cdn.jsdelivr.net 'unsafe-inline';"
/>
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js 'unsafe-inline';"
/>
嘗試在您的腳本 src 或鏈接中使用 crossorigin="anonymous" 我認為可以解決問題
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" crossorigin="anonymous">
https://developer.mozilla.org/fr/docs/Web/HTML/Reglages_des_attributs_CORS
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.