Skip to content
Download

exposeHeaders

mach::CorsBuilder::exposeHeaders

Exposes multiple headers.

Exposes the specified HTTP response headers to the client.

CorsBuilder& exposeHeaders(std::initializer_list<std::string_view> headers);

A reference to the current CorsBuilder instance.

Parameter Description
headers The headers to expose.

This method may be called multiple times to expose additional headers.

This method is not thread-safe and should only be called during CORS configuration.

cors.exposeHeaders({
"X-Request-ID",
"X-RateLimit-Remaining"
});
Name Description
exposeHeader Exposes the specified header.