allowOrigins
mach::CorsBuilder::allowOrigin
Allows multiple methods.
Description
Section titled “Description”Allows requests using the specified HTTP methods.
Syntax
Section titled “Syntax”CorsBuilder& allowMethods(std::initializer_list<http::Method> methods);Return Value
Section titled “Return Value”A reference to the current CorsBuilder instance.
Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
methods |
The Methods to allow. |
Remarks
Section titled “Remarks”This method may be called multiple times to add additional methods.
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.allowMethods({ mach::http::Method::Get, mach::http::Method::Post});See Also
Section titled “See Also”| Name | Description |
|---|---|
allowMethod |
Allows the specified method. |