差異處
這裏顯示兩個版本的差異處。
java:jenkins:directorybrowsersupport.scp [2016/08/31 13:34] tony [Problem] |
java:jenkins:directorybrowsersupport.scp [2023/06/25 09:48] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | {{tag>jenkins}} | ||
- | ====== DirectoryBrowserSupport.SCP Problem ====== | ||
- | ===== Problem ===== | ||
- | 某天更新Jenkins後,RobotFramework的報表無法完整呈現,像CSS不見、javascript無法執行還有圖片無法顯示等。這問題是由於[[https://content-security-policy.com/|Content Security Policy ]]所造成的,必須設定Jenkins變數去解決。 | ||
- | ===== How to? ===== | ||
- | 首先到Script Console: %JENKINS_URL%/script中,執行以下指定確認你目前的policy: | ||
- | <code java> | ||
- | System.getProperty("hudson.model.DirectoryBrowserSupport.CSP") | ||
- | </code> | ||
- | 執行以下指令去設定新的policy: | ||
- | <code java> | ||
- | System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","default-src 'unsafe-inline' 'unsafe-eval' img-src * data:;") | ||
- | </code> | ||
- | 在有問題的網頁要清除網頁暫存後重新整理,應該就可以看到你要的內容。 | ||
- | |||
- | ===== Resource ===== | ||
- | * [[https://github.com/gatling/gatling/issues/2889|Jenkins - 'allow-scripts' permission is not set ]] | ||
- | * [[http://stackoverflow.com/questions/37618892/jenkins-content-security-policy|Jenkins Content Security Policy]] | ||
- | * [[https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy|Jenkins - Configuring Content Security Policy]] | ||
- | * [[https://content-security-policy.com/|content-security-policy]] | ||
- | |||
- | ===== ===== | ||
- | ---- | ||
- | \\ | ||
- | ~~DISQUS~~ | ||
- | |||