Class
SoupHSTSEnforcer
Description [src]
class Soup.HSTSEnforcer : GObject.Object {
parent_instance: GObject
}
Automatic HTTP Strict Transport Security enforcing for SoupSession
.
A SoupHSTSEnforcer
stores HSTS policies and enforces them when
required. SoupHSTSEnforcer
implements SoupSessionFeature
, so you
can add an HSTS enforcer to a session with
soup_session_add_feature()
or soup_session_add_feature_by_type()
.
SoupHSTSEnforcer
keeps track of all the HTTPS destinations that,
when connected to, return the Strict-Transport-Security header with
valid values. SoupHSTSEnforcer
will forget those destinations
upon expiry or when the server requests it.
When the SoupSession
the SoupHSTSEnforcer
is attached to queues or
restarts a message, the SoupHSTSEnforcer
will rewrite the URI to HTTPS if
the destination is a known HSTS host and is contacted over an insecure
transport protocol (HTTP). Users of SoupHSTSEnforcer
are advised to listen
to changes in the SoupMessage:uri
property in order to be aware of
changes in the message URI.
Note that SoupHSTSEnforcer
does not support any form of long-term
HSTS policy persistence. See SoupHSTSEnforcerDB
for a persistent enforcer.
Instance methods
soup_hsts_enforcer_has_valid_policy
Gets whether hsts_enforcer
has a currently valid policy for domain
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct SoupHSTSEnforcerClass {
GObjectClass parent_class;
gboolean (* is_persistent) (
SoupHSTSEnforcer* hsts_enforcer
);
gboolean (* has_valid_policy) (
SoupHSTSEnforcer* hsts_enforcer,
const char* domain
);
void (* changed) (
SoupHSTSEnforcer* enforcer,
SoupHSTSPolicy* old_policy,
SoupHSTSPolicy* new_policy
);
}
Class structure for SoupHSTSEnforcer
.
Class members
parent_class: GObjectClass
The parent class.
is_persistent: gboolean (* is_persistent) ( SoupHSTSEnforcer* hsts_enforcer )
- No description available.
has_valid_policy: gboolean (* has_valid_policy) ( SoupHSTSEnforcer* hsts_enforcer, const char* domain )
- No description available.
changed: void (* changed) ( SoupHSTSEnforcer* enforcer, SoupHSTSPolicy* old_policy, SoupHSTSPolicy* new_policy )
- No description available.
Virtual methods
Soup.HSTSEnforcerClass.has_valid_policy
Gets whether hsts_enforcer
has a currently valid policy for domain
.