Question - so I am trying to use the protractor-beautiful-reporter on my jenkins install. This is an agular app. However when the page is rendered showing that the angular bit isn't working. Looking at the console for the page shows the following:
Content Security Policy: The page’s settings blocked the loading of a resource at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js (“script-src http://dskvm4981-iis:8080 'unsafe-inline' 'unsafe-eval'”).
I already use a couple of setProperty to override CSP for the machine. These are:
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';")
System.setProperty("jenkins.model.DirectoryBrowserSupport.CSP", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';")
Anyone know how change the above to work from either a local file or a remote file?
“script-src http://dskvm4981-iis:8080 'unsafe-inline' 'unsafe-eval'”part of the error message indicates you have a CSP policy specified somewhere other than with theSystem.setPropertyproperties — maybe you have it in ametaelement in the document itself? — and that policy is only allowing scripts fromhttp://dskvm4981-iis:8080. Wherever you have the CSP policy specified, you need to change it to allow the script fromhttps://ajax.googleapis.com/; e.g.,script-src http://dskvm4981-iis:8080 https://ajax.googleapis.com/ 'unsafe-inline' 'unsafe-eval'”- sideshowbarker