changes.mady.by.user Mike Olivas
Saved on Mar 01, 2019
changes.mady.by.user Amy Smith
Saved on May 31, 2022
...
However this relaxes the security only temporarily ,to make it permanent:
edit the jenkins.xml in $JENKINS_HOME (eg. C:\Program Files\Jenkins) and
add -Dhudson.model.DirectoryBrowserSupport.CSP="img-src 'self' data:;" to the <service id="jenkins"><arguments> tag aka
<arguments>-Xrs -Xmx256m -Dhudson.model.DirectoryBrowserSupport.CSP="\"img-src 'self' data:;\"" -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>
It seems for RedHat, the file to modify is /etc/sysconfig/jenkins and the property is JENKINS_JAVA_OPTIONS.
like this
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=\"img-src 'self' data:;\""
the \" are important so that the java parser parses the values correctly.
However this relaxes the security only temporarily ,to make it permanent:
edit the jenkins.xml in $JENKINS_HOME (eg. C:\Program Files\Jenkins) and
add -Dhudson.model.DirectoryBrowserSupport.CSP="img-src 'self' data:;" to the <service id="jenkins"><arguments> tag aka
It seems for RedHat, the file to modify is /etc/sysconfig/jenkins and the property is JENKINS_JAVA_OPTIONS.
like this
the \" are important so that the java parser parses the values correctly.