allowHeader
mach::CorsBuilder::allowHeader
Allows the specified header.
Description
Section titled “Description”Allows requests using the specified HTTP header.
Syntax
Section titled “Syntax”CorsBuilder& allowHeader(std::string_view header);Return Value
Section titled “Return Value”A reference to the current CorsBuilder instance.
Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
header |
The header to allow. |
Remarks
Section titled “Remarks”This method may be called multiple times to allow multiple headers.
Thread Safety
Section titled “Thread Safety”This method is not thread-safe and should only be called during CORS configuration.
Example
Section titled “Example”cors.allowHeader("Authorization");See Also
Section titled “See Also”| Name | Description |
|---|---|
allowHeaders |
Allows multiple headers. |