Ember content security policy error while following new emberjs guides?

While following new emberjs guides(2.2.0) I’m constantly getting the following error and no image is rendering in the browser. Can anyone help here?

[Report Only] Refused to load the image ‘data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIW…sEfqaEr1XYavAMwHMAD1z2/wXgx7qC72+vxP/dKhHH7wEASvaA8SqpSrsAAAAASUVORK5CYII=’ because it violates the following Content Security Policy directive: “img-src ‘self’”.

Is there any way to turn-off content-security-policy ? Atleast of learning purpose !

this addon will help: https://github.com/rwjblue/ember-cli-content-security-policy

did you try using the proxy with the ember-cli if you are using that tool.

ember server --proxy “http://localhost:8080

you can also edit your environment.js and update the

contentSecurityPolicy: {
  'default-src': "'none'",
  'script-src': "'self' 'unsafe-inline' 'unsafe-eval' ",
  'font-src': "'self' data: fonts.gstatic.com",
  'connect-src': "'self' 'unsafe-inline' 'unsafe-eval' http://localhost:8080, http://[::1]:8080/",
  'img-src': "'self' ",
  'style-src': "'self' 'unsafe-inline' fonts.googleapis.com",
  'frame-src': " "
},
1 Like