0

A while ago, Jenkins introduced CSP header which is very restrictive in terms of protecting user from malicious HTML/JS files. It's possible to relax this rules by temporarily changing "hudson.model.DirectoryBrowserSupport.CSP" property in Jenkins' Script Console, shown for instance here: Jenkins Content Security Policy

However, I would like to have it set permanently. Unfortunately, I'm yet to find how it should be done properly if someone's using Helm Charts to define Jenkins. Does anyone have working solution?

Any help appreciated.

mtweeman
  • 1
  • 2

2 Answers2

0

You can do this using the javaOpts property of the controller.

controller:
  javaOpts: -Dhudson.model.DirectoryBrowserSupport.CSP="..."

https://github.com/jenkinsci/helm-charts/blob/jenkins-4.1.3/charts/jenkins/values.yaml#L88

Ozmodiar
  • 136
  • 1
  • 3
0

I thinks you can use this parameter

controller:
  jenkinsOpts: -Dhudson.model.DirectoryBrowserSupport.CSP="..."
fajarhide
  • 423
  • 5
  • 7