0

ember-cli プロジェクトで Liquid-Fire をアップロードすると、白い画面が表示されます。ここにエラーが表示されます。ember バージョン 1.13.1、node.12.2、npm 2.12.1、liquid-fire 0.20.4 を実行しています。 2番目にliquid-fireをアンインストールすると、完全に正常に機能し始めます。アイデアはありますか?

about:1 [Report Only] Refused to load the script'http://maps.googleapis.com/maps/api/js?v=3' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

about:13 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
js?v=3:8 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/main.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

js?v=3:8 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:16 [Report Only] Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=EB+Garamond' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://*.googleapis.com  data:".

about:16 [Report Only] Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Lily+Script+One' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://*.googleapis.com  data:".

about:16 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:23 GET http://localhost:4200/assets/bootstrap.css.map 404 (Not Found)
velocity.js:660 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/ebgaramond/v7/kYZt1bJ8UsGAPRGnkXPeFY4P5ICox8Kq3LLUNMylGO4.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

velocity.js:660 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/lilyscriptone/v4/uPWsLVW8uiXqIBnE8ZwGPCJccsb45t3MJKcv5BJtrIs.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

ember.debug.js:48 Uncaught Error: Could not find module htmlbars-runtime
velocity.js:660 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:1 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/ebgaramond/v7/kYZt1bJ8UsGAPRGnkXPeFY4P5ICox8Kq3LLUNMylGO4.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

about:1 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
bundle.js:1 init on: localhost
main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/common.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/util.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/stats.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
main.js:27 [Report Only] Refused to load the script 'http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1…p%3A%2F%2Flocalhost%3A4200%2Fabout&5e1&callback=_xdc_._nayihi&token=102154' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
4

1 に答える 1

0

問題は、コンテンツ セキュリティ ポリシーに関連している可能性があります。script-src と font-src については、config/environment.js で environment.js を構成する必要があります。

module.exports = function(environment) {
  var ENV = {
    contentSecurityPolicy: {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval'   maps.googleapis.com maps.gstatic.com",
      'font-src': "'self' data: fonts.gstatic.com",
      ....
    },

};
于 2015-07-19T23:31:15.430 に答える