Struct iron_csrf::CsrfConfigBuilder [] [src]

pub struct CsrfConfigBuilder { /* fields omitted */ }

A utility to help build a CsrfConfig in an API backwards compatible way.

Methods

impl CsrfConfigBuilder
[src]

Set the TTL in seconds for CSRF cookies and tokens.

Default: 3600

Set the HTTP methods that are require CSRF protection.

Default: POST, PUT, PATCH, DELETE

Set the Secure flag on the CSRF cookie. If this is set to true, then user agents will only send the cookie over HTTPS.

Default: false/absent.

Validate and build the CsrfConfig.