exposeHeaders
mach::CorsBuilder::exposeHeaders
Exposes multiple headers.
Description
Section titled “Description”Exposes the specified HTTP response headers to the client.
Syntax
Section titled “Syntax”CorsBuilder& exposeHeaders(std::initializer_list<std::string_view> headers);Return Value
Section titled “Return Value”A reference to the current CorsBuilder instance.
Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
headers |
The headers to expose. |
Remarks
Section titled “Remarks”This method may be called multiple times to expose additional 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.exposeHeaders({ "X-Request-ID", "X-RateLimit-Remaining"});See Also
Section titled “See Also”| Name | Description |
|---|---|
exposeHeader |
Exposes the specified header. |