Definition at line 28 of file cors.hpp.
|
| std::vector< std::string > | allowed_origins |
| | Allowed origins. Use "*" to allow all origins (not recommended for production)
|
| |
| std::vector< std::string > | allowed_methods |
| | Allowed HTTP methods.
|
| |
| std::vector< std::string > | allowed_headers |
| | Allowed headers.
|
| |
| std::vector< std::string > | exposed_headers |
| | Headers that can be exposed to the browser.
|
| |
| bool | allow_credentials {false} |
| | Whether to allow credentials (cookies, authorization headers)
|
| |
| std::chrono::seconds | max_age {std::chrono::hours(24)} |
| | Maximum age for preflight cache.
|
| |
◆ allow_credentials
| bool server::middlewares::Cors::Config::allow_credentials {false} |
Whether to allow credentials (cookies, authorization headers)
Definition at line 55 of file cors.hpp.
◆ allowed_headers
| std::vector<std::string> server::middlewares::Cors::Config::allowed_headers |
Initial value:= {
std::string(::http::headers::kAccept),
std::string(::http::headers::kAcceptLanguage),
std::string(::http::headers::kContentLanguage),
std::string(::http::headers::kContentType),
}
Allowed headers.
Definition at line 44 of file cors.hpp.
◆ allowed_methods
| std::vector<std::string> server::middlewares::Cors::Config::allowed_methods |
Initial value:= {
ToString(http::HttpMethod::kGet),
ToString(http::HttpMethod::kPost),
ToString(http::HttpMethod::kPut),
ToString(http::HttpMethod::kPatch),
ToString(http::HttpMethod::kDelete),
ToString(http::HttpMethod::kHead),
ToString(http::HttpMethod::kOptions),
}
Allowed HTTP methods.
Definition at line 33 of file cors.hpp.
◆ allowed_origins
| std::vector<std::string> server::middlewares::Cors::Config::allowed_origins |
Allowed origins. Use "*" to allow all origins (not recommended for production)
Definition at line 30 of file cors.hpp.
◆ exposed_headers
| std::vector<std::string> server::middlewares::Cors::Config::exposed_headers |
Headers that can be exposed to the browser.
Definition at line 52 of file cors.hpp.
◆ max_age
| std::chrono::seconds server::middlewares::Cors::Config::max_age {std::chrono::hours(24)} |
Maximum age for preflight cache.
Definition at line 58 of file cors.hpp.
The documentation for this struct was generated from the following file: