2017-07-19 112 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"

什么应该是当前的配置在詹金斯允许我查看报告?

回答

相关问题