headerName
mach::CsrfBuilder::headerName
Sets the CSRF header name.
Description
Section titled “Description”Sets the name of the HTTP header used to provide the CSRF token.
Syntax
Section titled “Syntax”CsrfBuilder& headerName(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 header 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.headerName("X-CSRF-Token");See Also
Section titled “See Also”| Name | Description |
|---|---|
cookieName |
Sets the CSRF token cookie name. |