HSTSEnforcerDB

class HSTSEnforcerDB(**properties: Any)

Superclasses: HSTSEnforcer, Object

Implemented Interfaces: SessionFeature

Persistent HTTP Strict Transport Security enforcer.

SoupHSTSEnforcerDB is a HSTSEnforcer that uses a SQLite database as a backend for persistency.

Constructors

class HSTSEnforcerDB
classmethod new(filename: str) HSTSEnforcer

Creates a SoupHSTSEnforcerDB.

filename will be read in during the initialization of a SoupHSTSEnforcerDB, in order to create an initial set of HSTS policies. If the file doesn’t exist, a new database will be created and initialized. Changes to the policies during the lifetime of a SoupHSTSEnforcerDB will be written to filename when changed is emitted.

Parameters:

filename – the filename of the database to read/write from.

Properties

class HSTSEnforcerDB
props.filename: str

The filename of the SQLite database where HSTS policies are stored.