Web security has become increasingly sophisticated, and so have the tools and techniques used by attackers. One important HTTP security header that can bolster your defenses is Reporting-Endpoints. This experimental feature, part of the broader Reporting API, helps you receive detailed violation reports from various browser features—most commonly Content Security Policy (CSP) violations.
Reporting-Endpoints is a response header that tells browsers where to send specific violation or usage reports. It serves as the successor to the deprecated Report-To header. By defining endpoint URLs for reports, you can aggregate and analyze critical security information, such as CSP or Cross-Origin-Opener-Policy violations.
Currently classified as experimental and may not be fully supported in all browsers.
Can specify multiple endpoints to handle different categories of reports.
Non-secure (HTTP) endpoints are ignored. Endpoints must be served over HTTPS.
Without an endpoint for these reports, you have no direct visibility into policy breaches.
Miss out on special warnings from browser experiments or features that could indicate potential threats.
Lose valuable debugging information when issues arise from security settings or third-party scripts.
<IfModule mod_headers.c>
Header always set Reporting-Endpoints "csp-endpoint=\"https://example.com/csp-reports\""
Header always set Content-Security-Policy "default-src 'self'; report-to csp-endpoint"
</IfModule>
sudo systemctl reload apache2
server {
listen 443 ssl;
server_name example.com;
# SSL configuration omitted for brevity
add_header Reporting-Endpoints "csp-endpoint=\"https://example.com/csp-reports\"";
add_header Content-Security-Policy "default-src 'self'; report-to csp-endpoint";
location / {
# Your site configuration
}
}
nginx -t
sudo systemctl reload nginx
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Reporting-Endpoints"
value="csp-endpoint="https://example.com/csp-reports"" />
<add name="Content-Security-Policy"
value="default-src 'self'; report-to csp-endpoint" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Because Reporting-Endpoints is still experimental, its behavior may vary depending on the browser's implementation status. Nonetheless, adopting it early can provide a proactive layer of security monitoring.
Combining this header with robust policies—like strict CSP rules and other well-configured HTTP security headers—creates a multi-layered approach to safeguarding your online assets.
Learn about other HTTP security headers to strengthen your website's security: