cookieName
mach::CsrfBuilder::cookieName
Sets the CSRF cookie name.
Description
Section titled “Description”Sets the name of the cookie used to store the CSRF token.
Syntax
Section titled “Syntax”CsrfBuilder& cookieName(std::string_view name);Return Value
Section titled “Return Value”A reference to the current CsrfBuilder instance.
Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
name |
The CSRF cookie name. |
Thread Safety
Section titled “Thread Safety”This method is not thread-safe and should only be called during CSRF configuration.
Example
Section titled “Example”csrf.cookieName("csrf-token");See Also
Section titled “See Also”| Name | Description |
|---|---|
headerName |
Sets the CSRF token header name. |