我在Chrome中遇到以下错误。有一些类似的帖子描述了这个问题,但我无法在我的应用程序中修复它:
拒绝加载脚本' https://maps.google.com/maps/api/js?v=3' 因为它违反了以下内容安全策略指令: " script-src' self' '不安全直插' https://www.google.com/jsapi https://ajax.googleapis.com https://ssl.google-analytics.com"。
拒绝加载脚本' https://vjs.zencdn.net/4.5/video.js' 因为它违反了以下内容安全策略指令: " script-src' self' '不安全直插' https://www.google.com/jsapi https://ajax.googleapis.com https://ssl.google-analytics.com"。
拒绝加载脚本 ' https://ws.sharethis.com/api/getCount2.php?cb=stButtons.processCB&refDomain' 因为它违反了以下内容安全策略指令: " script-src' self' '不安全直插' https://www.google.com/jsapi https://ajax.googleapis.com https://ssl.google-analytics.com"。
我没有该页面的任何特定元数据。我还在主html中链接了我的所有javascript库,如下所示。
<script type="text/javascript" src="js/three.min.js"></script>
<script type="text/javascript" src="js/Projector.js"></script>
<script type="text/javascript" src="js/ColladaLoader.js"></script>
<script type="text/javascript" src="js/Detector.js"></script>
<script type="text/javascript" src="js/OrbitControls.js"></script>
<script type="text/javascript" src="js/tween.min.js"></script>
<script type="text/javascript" src="js/stats.min.js"></script>
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type='text/javascript' src='js/dat.gui.min.js'></script>
<link rel="stylesheet" href="css/demo.css" type="text/css">
<link rel="stylesheet" href="css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="js/jquery.ztree.excheck-3.5.js"></script>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script src="https://maps.google.com/maps/api/js?v=3"></script>
<link type="text/css" rel="stylesheet" href="css/jquery-ui.css">
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="js/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "0aab9c2b-5a08-4c08-bfeb-6fdc7756ab6d", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
<link href="https://vjs.zencdn.net/4.5/video-js.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/4.5/video.js"></script>
<style type="text/css">.vjs-default-skin .vjs-control-bar { font-size: 89% }</style>
<script type="text/javascript">$(document).ready(function(){$.fn.zTree.init($("#treeDemo"), setting, zNodes);});</script>
....