Skip to content
Download

exposeHeader

mach::CorsBuilder::exposeHeader

Exposes the specified header.

Exposes the specified HTTP response header to the client.

CorsBuilder& exposeHeader(std::string_view header);

A reference to the current CorsBuilder instance.

Parameter Description
header The header to expose.

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

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

cors.exposeHeader("X-Request-ID");
Name Description
exposeHeaders Exposes multiple headers.