### Function

# Soup HSTSPolicy new_session_policy

#### Declaration [src]

    SoupHSTSPolicy*
    soup_hsts_policy_new_session_policy (
      const char* domain,
      gboolean include_subdomains
    )

#### Description [src]

Creates a new session `SoupHSTSPolicy` with the given attributes.

A session policy is a policy that is valid during the lifetime of the `SoupHSTSEnforcer` it is added to. Contrary to regular policies, it has no expiration date and is not stored in persistent enforcers. These policies are useful for user-agent to load their own or user-defined rules.

`domain` is a domain on which the strict transport security policy represented by this object must be enforced.

If `include_subdomains` is `TRUE`, the strict transport security policy must also be enforced on all subdomains of `domain`.

#### Parameters

`domain` | `const char*`
| Policy domain or hostname.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`include_subdomains` | `gboolean`
| `TRUE` if the policy applies on sub domains.

#### Return value

Returns: | `SoupHSTSPolicy`
| A new `SoupHSTSPolicy`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.