parameters: (self)
return_statement: return '; '.join([
              "frame-ancestors 'self'",
              # Make sure the report-uri is relative to the base_url
              "report-uri " + self.settings.get('csp_report_uri', url_path_join(self.base_url, csp_report_uri)),
          ])
docstring: The default Content-Security-Policy header
          
          Can be overridden by defining Content-Security-Policy in settings['headers']
docstring_summary: The default Content-Security-Policy header
          
          Can be overridden by defining Content-Security-Policy in settings['headers']
docstring_tokens: The default Content - Security - Policy header Can be overridden by defining Content - Security - Policy in settings [ headers ]
function: def content_security_policy(self):
          """The default Content-Security-Policy header
          
          Can be overridden by defining Content-Security-Policy in settings['headers']
          """
          if 'Content-Security-Policy' in self.settings.get('headers', {}):
              # user-specified, don't override
              return self.settings['headers']['Content-Security-Policy']
  
          return '; '.join([
              "frame-ancestors 'self'",
              # Make sure the report-uri is relative to the base_url
              "report-uri " + self.settings.get('csp_report_uri', url_path_join(self.base_url, csp_report_uri)),
          ])
function_tokens: def content_security_policy ( self ) : if 'Content-Security-Policy' in self . settings . get ( 'headers' , { } ) : # user-specified, don't override return self . settings [ 'headers' ] [ 'Content-Security-Policy' ] return '; ' . join ( [ "frame-ancestors 'self'" , # Make sure the report-uri is relative to the base_url "report-uri " + self . settings . get ( 'csp_report_uri' , url_path_join ( self . base_url , csp_report_uri ) ) , ] )