You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose the addition of support for the report-to directive by adding a new header Reporting-Endpoints and/or Report-To in addition to the Content-Security-Policy header.
The report-to CSP directive is already supported but will only work in combination with the Reporting-Endpoints or Report-To headers. Current support leaves defining this header up to the end user. I would like to discuss adding support in django-csp to define and set either of these headers.
There are conflicting standards at the moment, and as such, it would make sense to add support for the Report-To header initially. Support for the Reporting-Endpoints header could be added once the specification moves beyond a draft and browser support starts to be added.
Report-To
The Report-To header is used to define a group of reporting endpoints and the conditions under which reports should be sent to those endpoints. It allows specifying multiple endpoints, the maximum age for the configuration, and the types of reports to be sent. Seems to be currently supported by most browsers except Firefox.
Reporting-Endpoints
The Reporting-Endpoints header is a newer, simpler alternative to the Report-To header. It directly maps names to reporting endpoints without the additional configuration options provided by Report-To. Seems to be a W3C draft at the moment with no browser support
Arguments Against
There could be arguments made that this is beyond the scope of django-csp since, as shown in the above example, the reporting endpoints can also define other endpoints, such as the HTTP Public Key Pinning (HPKP) endpoints.
I would like to propose the addition of support for the
report-to
directive by adding a new headerReporting-Endpoints
and/orReport-To
in addition to theContent-Security-Policy
header.The
report-to
CSP directive is already supported but will only work in combination with theReporting-Endpoints
orReport-To
headers. Current support leaves defining this header up to the end user. I would like to discuss adding support in django-csp to define and set either of these headers.Configuration Example:
This would output the following HTTP headers:
There are conflicting standards at the moment, and as such, it would make sense to add support for the
Report-To
header initially. Support for theReporting-Endpoints
header could be added once the specification moves beyond a draft and browser support starts to be added.Report-To
The
Report-To
header is used to define a group of reporting endpoints and the conditions under which reports should be sent to those endpoints. It allows specifying multiple endpoints, the maximum age for the configuration, and the types of reports to be sent. Seems to be currently supported by most browsers except Firefox.Reporting-Endpoints
The
Reporting-Endpoints
header is a newer, simpler alternative to theReport-To
header. It directly maps names to reporting endpoints without the additional configuration options provided byReport-To
. Seems to be a W3C draft at the moment with no browser supportArguments Against
There could be arguments made that this is beyond the scope of django-csp since, as shown in the above example, the reporting endpoints can also define other endpoints, such as the HTTP Public Key Pinning (HPKP) endpoints.
References:
report-to
directiveReport-To
headerThe text was updated successfully, but these errors were encountered: