roar
|
Settings object to control CORS requests. More...
#include <cors.hpp>
Public Attributes | |
std::function< std::string(std::string const &)> | allowedOrigin |
Access-Control-Allow-Origin. | |
std::function< std::vector< std::string >(std::vector< std::string > const &)> | methodAllowSelection |
Access-Control-Allow-Methods. | |
std::function< std::vector< std::string >(std::vector< std::string > const &)> | headerAllowSelection |
Access-Control-Allow-Headers. | |
std::vector< boost::beast::http::field > | exposeHeaders {} |
Access-Control-Expose-Headers, will not be set if empty. | |
std::optional< bool > | allowCredentials {std::nullopt} |
Access-Control-Allow-Credentials. | |
bool | generatePreflightOptionsRoute = true |
Generate an OPTIONS route for preflights? | |
Settings object to control CORS requests.
std::optional<bool> Roar::CorsSettings::allowCredentials {std::nullopt} |
Access-Control-Allow-Credentials.
std::function<std::string(std::string const&)> Roar::CorsSettings::allowedOrigin |
Access-Control-Allow-Origin.
std::vector<boost::beast::http::field> Roar::CorsSettings::exposeHeaders {} |
Access-Control-Expose-Headers, will not be set if empty.
bool Roar::CorsSettings::generatePreflightOptionsRoute = true |
Generate an OPTIONS route for preflights?
std::function<std::vector<std::string>(std::vector<std::string> const&)> Roar::CorsSettings::headerAllowSelection |
Access-Control-Allow-Headers.
std::function<std::vector<std::string>(std::vector<std::string> const&)> Roar::CorsSettings::methodAllowSelection |
Access-Control-Allow-Methods.