Slide 12
Slide 12 text
Content-Security-Policy-Report-Only:
require-trusted-types-for 'script'; report-uri ...;
let p = trustedTypes.createPolicy("my-policy", {
createHTML: a=>a, createScript: a=>a, createScriptURL: a=>a
});
{"csp-report":{...
"violated-directive": "require-trusted-types-for",
"blocked-uri": "trusted-types-sink",
"line-number": 128,
"column-number": 73,
"source-file": "https://example.site/a.html",
"script-sample": "Element.innerHTML console.log('Hello');",
...}}
Trusted
Types
bit.ly/tt-introduction
bit.ly/tt-spec