Пример #1
0
 def content_security_policy_report_only(
         self, value: ContentSecurityPolicy) -> None:
     self._set_or_pop_header("Content-Security-Policy-Report-Only",
                             value.to_header())
Пример #2
0
 def on_update(csp: ContentSecurityPolicy) -> None:
     if not csp:
         del self.headers["content-security-policy-report-only"]
     else:
         self.headers["Content-Security-policy-report-only"] = csp.to_header()