exposeHeader
mach::CorsBuilder::exposeHeader
Exposes the specified header.
Description
Section titled “Description”Exposes the specified HTTP response header to the client.
Syntax
Section titled “Syntax”CorsBuilder& exposeHeader(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 expose. |
Remarks
Section titled “Remarks”This method may be called multiple times to expose 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.exposeHeader("X-Request-ID");See Also
Section titled “See Also”| Name | Description |
|---|---|
exposeHeaders |
Exposes multiple headers. |