File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,6 +339,25 @@ def report_to(self, report_to: ReportTo) -> "ContentSecurityPolicy":
339339 self ._build ("report-to" , report_to .value )
340340 return self
341341
342+ def report_uri (self , * values : str ) -> "ContentSecurityPolicy" :
343+ """Configure reporting endpoints in an older format
344+
345+ **Deprecated**
346+ This header has been deprecated in favor of report-to.
347+ However, as it is not yet supported in most browsers, it is recommended to set both headers.
348+ Browsers that support report-to will ignore report-uri if both headers are set.
349+
350+ Resouces:
351+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri
352+
353+ :param values: variable number of URIs
354+ :type values: str
355+ :return: ContentSecurityPolicy class
356+ :rtype: ContentSecurityPolicy
357+ """
358+ self ._build ("report-uri" , * values )
359+ return self
360+
342361 def sandbox (self , * values : str ) -> "ContentSecurityPolicy" :
343362 """Enables sandbox restrictions
344363
@@ -466,7 +485,7 @@ class XXSSProtection:
466485 """
467486 Enable browser Cross-Site Scripting filters
468487
469- **Depreciated **
488+ **Deprecated **
470489
471490 Recommended to utilize `Content-Security-Policy`
472491 instead of the legacy `X-XSS-Protection` header.
You can’t perform that action at this time.
0 commit comments