我需要在我的网站中包含此脚本https://apis.google.com/js/api:client.js。在Google Chrome上它可以正常运行,但在Firefox(和IE显然)上,我遇到了一些错误:
内容安全策略:在script-src中忽略“'unsafe-inline'”:“strict-dynamic”指定
内容安全策略:在script-src中忽略“https:”:“strict-dynamic”指定
内容安全策略:在script-src中忽略“http:”:“strict-dynamic”指定
我尝试更改标签中的内容安全策略头,但未成功。
我尝试使用以下所有选项:
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self'; script-src 'self' apis.google.com; style-src 'self';">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' apis.google.com">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval' https://*.google.com; object-src 'self' 'unsafe-eval'">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval' apis.google.com;">