2017-07-19 116 views
0

您好我正在使用jenkins,並在自動運行結束時生成報告,運行jenkins生成發佈html目錄到作業文件夾後,我可以看到當前日誌報告,但我得到了一些錯誤發佈html插件:違反以下內容安全策略指令

ExtentScreenshot.html:1 The source list for Content Security Policy directive 'script-src' contains an invalid source: ''allow-scripts''. It will be ignored. ExtentScreenshot.html:22 Refused to load the stylesheet ' https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600 ' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' ".

ExtentScreenshot.html:23 Refused to load the stylesheet ' https://cdn.rawgit.com/anshooarora/extentreports/45123d736a03aca0abc5c4fcf1e746fef49736fd/cdn/extent.css ' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' ".

ExtentScreenshot.html:1 Refused to load the script ' https://cdn.rawgit.com/anshooarora/extentreports/6032d73243ba4fe4fb8769eb9c315d4fdf16fe68/cdn/extent.js ' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'allow-scripts'".

ExtentScreenshot.html:695 Uncaught ReferenceError: $ is not defined at ExtentScreenshot.html:695 ExtentScreenshot.html:699 Uncaught ReferenceError: $ is not defined at ExtentScreenshot.html:699 ExtentScreenshot.html:1 Refused to load the stylesheet ' https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600 ' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' ".

ExtentScreenshot.html:1 Refused to load the stylesheet ' https://cdn.rawgit.com/anshooarora/extentreports/45123d736a03aca0abc5c4fcf1e746fef49736fd/cdn/extent.css ' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' ".

,因爲我在我的詹金斯其他報告中使用我必須改變jenkins.xml文件中的行

-Xrs -Xmx1048m -XX:MaxPermSize=512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle "-Dhudson.model.DirectoryBrowserSupport.CSP= img-src 'self'; style-src 'self' 'unsafe-inline' ;script-src 'self' 'unsafe-inline' 'allow-scripts' " -jar "%BASE%\jenkins.war" --httpPort=2020 --webroot="%BASE%\war"--accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file="%BASE%/logs/access.log"

什麼應該是當前的配置在詹金斯允許我查看報告?

回答

相關問題