3#include <boost/beast/http/empty_body.hpp>
26 std::optional<CorsSettings>
cors;
46 std::variant<std::string, std::regex, Detail::ServedPath>
path;
48 std::function<bool(std::string
const&, std::vector<std::string>&)>
matches;
This class extends the boost::beast::http::request<BodyT> with additional convenience.
Definition request.hpp:52
Definition session.hpp:41
Definition authorization.hpp:10
Definition proto_route.hpp:32
std::string basePath
Definition proto_route.hpp:33
A proper Route is built up from this object. This object is usually created internally.
Definition proto_route.hpp:45
std::function< bool(std::string const &, std::vector< std::string > &)> matches
Definition proto_route.hpp:48
RouteOptions routeOptions
Definition proto_route.hpp:49
std::variant< std::string, std::regex, Detail::ServedPath > path
Definition proto_route.hpp:46
std::function< void(Session &session, Request< boost::beast::http::empty_body > &&req)> callRoute
Definition proto_route.hpp:47
Options that modify the server behavior for a given route.
Definition proto_route.hpp:18
bool expectUpgrade
Set this to true if you expect a websocket upgrade request on this route.
Definition proto_route.hpp:23
bool allowUnsecure
If the server is an https server, setting this to true will allow unencrypted requests on this route.
Definition proto_route.hpp:20
std::optional< CorsSettings > cors
Set this to provide automatically generated cors headers and preflight requests.
Definition proto_route.hpp:26