Skip to content
Download

allowHeader

mach::CorsBuilder::allowHeader

Allows the specified header.

Allows requests using the specified HTTP header.

CorsBuilder& allowHeader(std::string_view header);

A reference to the current CorsBuilder instance.

Parameter Description
header The header to allow.

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

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

cors.allowHeader("Authorization");
Name Description
allowHeaders Allows multiple headers.