# controller\_csp\_report

Source: https://zotonic.com/docs/2515/controller_csp_report

URI: https://zotonic.com/id/2515

Language: en



Controller handling Content-Security-Policy reports.

Set in the `report-to` header of your Content-Security-Policy the URL to this controller to receive reports about policy violations.

Reports whose blocked URL or source file uses a known browser extension scheme are ignored. Inline and eval violations without an extension URL are retained, as they cannot reliably be distinguished from site violations.

Accepted reports are forwarded with `z_notifier:notify_sync/2` as `#content_security_report{}` notifications. Modules can export `observe_content_security_report/2` or `pid_observe_content_security_report/3` to receive them. See `zotonic_observer:observe_content_security_report/2` for the fields, delivery semantics and validation requirements.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2515?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2515?language=en>)
