3 ms·
You can set CSP headers that browsers will read for content security policy (to prevent or notice unusual content includes or sources). There can be two consequ
by lstamour 9y ago
You can set CSP headers that browsers will read for content security policy (to prevent or notice unusual content includes or sources). There can be two consequences: violations can be blocked, or they can load but get reported in console. If a URL is set in the CSP header, the browser can report the violations to another URL for inspection and tracking.
For the details, see https://www.w3.org/TR/CSP3/#report-violation https://www.w3.org/TR/CSP3/#report-violation
Like error tracking, the tricky bit isn’t always the reporting, it can also be learning to ignore errors caused by extensions, or grouping and alerting on issues in report-only mode such that they can be fixed in a timely fashion. That said, even knowing what to use as a CSP header can be daunting, so there’s plenty of room to make this powerful security feature easier to use.