routing::Middleware proxy(ProxyOptions options)
Returns a middleware that proxies requests to a single target URL (ip/hostname and port).
Definition Proxy.cpp:441
routing::Middleware load_balancer(LoadBalancerOptions options)
Returns a middleware that load-balances requests across multiple upstream nodes.
Definition Proxy.cpp:457
Definition Compress.hpp:4
std::function< bool(http::HttpRequest &, std::shared_ptr< http::ResponseWriter >)> Middleware
Definition Router.hpp:17
Options for LoadBalancer middleware.
Definition Proxy.hpp:49
std::string strip_prefix
Definition Proxy.hpp:51
std::vector< TargetNode > nodes
Definition Proxy.hpp:50
Options for Proxy middleware.
Definition Proxy.hpp:11
int target_port
Definition Proxy.hpp:13
std::string target_host
Definition Proxy.hpp:12
std::string strip_prefix
Definition Proxy.hpp:14
A target node for the load balancer.
Definition Proxy.hpp:40
std::string host
Definition Proxy.hpp:41
int port
Definition Proxy.hpp:42