microserve::ProxyTarget struct

Parsed proxy_pass value (nginx-compatible).

has_uri is true when the directive includes a URI after host[:port] (including a lone /). Then the location prefix is replaced by uri. Otherwise the original request target is forwarded unchanged.

Public variables

std::string scheme
http, https, or h2c.
std::string host
Upstream hostname or IP.
unsigned short port
Upstream port (scheme default if omitted).
std::string uri
Replacement URI when has_uri is true.
bool has_uri
True if proxy_pass included a URI path.
std::string backend_name
Named backend when using the backend: form.