blob: f8764e893d6fcf08cfbd0fb2a75087e27929d17b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"use strict";
function ReportingCSP(reportURI, reportGroup) {
return Object.assign(
new CapsCSP(new NetCSP(
`report-uri ${reportURI};`,
`;report-to ${reportGroup};`
)),
{
reportURI,
reportGroup,
reportToHeader: {
name: "Report-To",
value: JSON.stringify({ "url": reportURI,
"group": reportGroup,
"max-age": 10886400 }),
}
}
);
}
|