Configuring Content Security Policy

33 views
Skip to first unread message

Lino Capobianco

unread,
Feb 17, 2016, 5:00:41 AM2/17/16
to Jenkins Developers
Hi all,

I'm trying to set a link (<a href ...>) to load a html site (created for any build). When I click the link, I get this exception on the Google Chrome Console:

I tried to following things:

Typing (in Jenkins script console):

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src * 'unsafe-inline';")


And I also tried changing it directly in the java.xml

like:

<arguments>
-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle 
"-Dhudson.model.DirectoryBrowserSupport.CSP=cript-src * 'unsafe-inline'" 
-jar "%BASE%\jenkins.war" --httpPort=8080
</arguments>
  
Both solutions are not working. Am I using this in the wrong way? 
I want to load an HTML site on a new tab. This HTML-Site has JS included and should be working. The site is as you can see in the workspace folder. 
What do I have to type in the script console to make the script sites working?

Thank you for your help!

Lino Capobianco

unread,
Feb 17, 2016, 5:16:03 AM2/17/16
to Jenkins Developers
When I type this:

System.getProperty("hudson.model.DirectoryBrowserSupport.CSP")

I get this answer:

Result: default-src * data:

...still not changing anything!
Reply all
Reply to author
Forward
0 new messages