Skip to content

Instantly share code, notes, and snippets.

@adiralashiva8
Created April 20, 2024 16:02
Show Gist options
  • Save adiralashiva8/72fdf18bb7cd9979b1d0eb607f3efd20 to your computer and use it in GitHub Desktop.
Save adiralashiva8/72fdf18bb7cd9979b1d0eb607f3efd20 to your computer and use it in GitHub Desktop.
Jenkins start-up script to enable images, links, javascript
# Step 1: In jenkins home directory create folder with name "init.groovy.d"
# Step 2: under above folder create file with name "startup-properties.groovy"
# Step 3: Include following code in it
import jenkins.model.Jenkins
import java.util.logging.LogManager
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-same-origin allow-popups allow-scripts; default-src *; img-src 'self' data:; style-src * http://* 'unsafe-inline' 'unsafe-eval'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment