OpenQuizz
Une application de gestion des contenus pédagogiques
ContentSecurityPolicy Class Reference
Inheritance diagram for ContentSecurityPolicy:
Collaboration diagram for ContentSecurityPolicy:

Public Member Functions

def __init__ (self, values=(), on_update=None)
 
def to_header (self)
 
def __str__ (self)
 
def __repr__ (self)
 
- Public Member Functions inherited from UpdateDictMixin
def calls_update (name)
 
def setdefault (self, key, default=None)
 
def pop (self, key, default=_missing)
 

Data Fields

 on_update
 
 provided
 

Static Public Attributes

 base_uri
 
 child_src
 
 connect_src
 
 default_src
 
 font_src
 
 form_action
 
 frame_ancestors
 
 frame_src
 
 img_src
 
 manifest_src
 
 media_src
 
 navigate_to
 
 object_src
 
 prefetch_src
 
 plugin_types
 
 report_to
 
 report_uri
 
 sandbox
 
 script_src
 
 script_src_attr
 
 script_src_elem
 
 style_src
 
 style_src_attr
 
 style_src_elem
 
 worker_src
 
- Static Public Attributes inherited from UpdateDictMixin
 on_update
 
 clear
 
 popitem
 
 update
 

Detailed Description

Subclass of a dict that stores values for a Content Security Policy
header. It has accessors for all the level 3 policies.

Because the csp directives in the HTTP header use dashes the
python descriptors use underscores for that.

To get a header of the :class:`ContentSecuirtyPolicy` object again
you can convert the object into a string or call the
:meth:`to_header` method.  If you plan to subclass it and add your
own items have a look at the sourcecode for that class.

.. versionadded:: 1.0.0
   Support for Content Security Policy headers was added.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  values = (),
  on_update = None 
)

Member Function Documentation

◆ __repr__()

def __repr__ (   self)

◆ __str__()

def __str__ (   self)

◆ to_header()

def to_header (   self)
Convert the stored values into a cache control header.

Field Documentation

◆ base_uri

base_uri
static

◆ child_src

child_src
static

◆ connect_src

connect_src
static

◆ default_src

default_src
static

◆ font_src

font_src
static

◆ form_action

form_action
static

◆ frame_ancestors

frame_ancestors
static

◆ frame_src

frame_src
static

◆ img_src

img_src
static

◆ manifest_src

manifest_src
static

◆ media_src

media_src
static

◆ navigate_to

navigate_to
static

◆ object_src

object_src
static

◆ on_update

on_update

◆ plugin_types

plugin_types
static

◆ prefetch_src

prefetch_src
static

◆ provided

provided

◆ report_to

report_to
static

◆ report_uri

report_uri
static

◆ sandbox

sandbox
static

◆ script_src

script_src
static

◆ script_src_attr

script_src_attr
static

◆ script_src_elem

script_src_elem
static

◆ style_src

style_src
static

◆ style_src_attr

style_src_attr
static

◆ style_src_elem

style_src_elem
static

◆ worker_src

worker_src
static

The documentation for this class was generated from the following file: