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