set_policy


Description:

[ Version ( since = "2.68" ) ]
public void set_policy (HSTSPolicy policy)

Sets policy to this.

If policy is expired, any existing HSTS policy for its host will be removed instead. If a policy existed for this host, it will be replaced. Otherwise, the new policy will be inserted. If the policy is a session policy, that is, one created with HSTSPolicy.session_policy, the policy will not expire and will be enforced during the lifetime of this's Session.

Parameters:

this

a HSTSEnforcer

policy

the policy of the HSTS host