Help Resolving error: [Report Only] Refused to load the script


#1

I just created a new Ember-cli project and I keep getting two errors in Chrome’s console window.

[Report Only] Refused to load the script 'http://10.1.3.34:35729/livereload.js?snipver=1' because it violates the following Content Security Policy directive: "script-src 'self' 'localhost' 'unsafe-inline' 'unsafe-eval' localhost:35729".

and

[Report Only] Refused to connect to 'ws://10.1.3.34:35729/livereload' because it violates the following Content Security Policy directive: "connect-src 'self' 'localhost' ws://localhost:35729".

My contentSecurityPolicy in environment.js is:

contentSecurityPolicy: {
  'default-src': "'none' 'self'",
  'script-src': "'self' 'localhost' 'unsafe-inline' 'unsafe-eval'",
  'font-src': "'self'",
  'connect-src': "'self' 'localhost'",
  'style-src': "'self' 'unsafe-inline'",
}

#2

Hi! I believe you need to add the url 10.1.3.34 to your contentSecurityPolicy inside environment.js

i.e:

contentSecurityPolicy: { ‘default-src’: “‘none’ ‘self’”,
‘script-src’: “‘self’ ‘localhost’ ‘unsafe-inline’ ‘unsafe-eval’ 10.1.3.34:35729”, ‘font-src’: “‘self’”, ‘connect-src’: “‘self’ ‘localhost’”, ‘style-src’: “‘self’ ‘unsafe-inline’”, }

Take a look at this: http://content-security-policy.com/#source_list