Ela*_*nda 4 html javascript css jquery
我有一个带有此标题的网页.
这是一个只有twitter bootstrap js的非交互式页面.
<head>
<title>Versions: unknown bl version vs. 1.0.487 [flavor: HISTORIC_TIME]</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script type="script" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<link rel="icon" href="/jenkins/view/QA/job/RoutingRegression/ws/src/main/resources/html_pages/images/favicon.png" type="image/gif" sizes="16x16">
</head>
Run Code Online (Sandbox Code Playgroud)
我在stackoverflow上看到了一些帖子,但无法理解如何解决这个问题.
拒绝加载样式表' https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css ',因为它违反了以下内容安全策略指令:"style-src'self'".
landing_page.html:1拒绝加载样式表' https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css ',因为它违反了以下内容安全策略指令:"style- src'self'".
我试图改变<meta>为
<meta content="text/html; charset=utf-8 ;script-src 'self' http://onlineerp.solution.quebec 'unsafe-inline' 'unsafe-eval';" http-equiv="content-type">
Run Code Online (Sandbox Code Playgroud)
但它没有帮助
任何的想法?
尝试将CSP拆分为单独的标记并添加style-src引用,如下所示:
<meta http-equiv="content-type" content="text/html; charset=utf-8 ;">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' http://onlineerp.solution.quebec 'unsafe-inline' 'unsafe-eval'; style-src 'self' maxcdn.bootstrapcdn.com">
Run Code Online (Sandbox Code Playgroud)
这应该说你信任来自maxcdn.bootstrapcdn.com的样式.
有关内容安全策略的详细解释,请访问http://content-security-policy.com/
| 归档时间: |
|
| 查看次数: |
26504 次 |
| 最近记录: |