我可以使用下面的代码片段
在每个JSP页面中设置HSTS标头select DISTINCT t1.Reviewed, t2.BU,
(SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Supervisor') AS Supervisor,
(((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Supervisor')/100) * 6) as Sup6,
(SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Own') AS Own,
(((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Own')/100) * 6) as Own6,
(SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Peer') AS Peer,
(((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Peer')/100) * 6) as Peer6,
(SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Subordinate') AS Subordinate,
(((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Subordinate')/100) * 6) as Sub6,
(ifnull((((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Supervisor')/100) * 6),6) * 0.3 +
ifnull((((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Peer')/100) * 6),6) * 0.4 +
ifnull((((SELECT ((sum(t2.RebasedValue)/(count(t2.RebasedValue)/20))) from RebasedQuestions t2 WHERE t2.Reviewed = t1.Reviewed and t2.ReviewType = 'Subordinate')/100) * 6),6) * 0.3) as Totaled
from Reviewed t1 JOIN RebasedQuestions t2 on t1.Reviewed = t2.Reviewed
但无法为我的代码中的某个js文件设置HSTS标头,这是由安全扫描团队报告的。
答案 0 :(得分:0)
将其设置为Web服务器级别,而不是JSP的一部分。这样就可以为所有资源设置。