mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-16 18:39:18 +08:00
a4c668e37a
PUBLISHED_FROM=00772400bce7c15368d91741092ebc8ab0842e19
701 B
701 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_http_reverse_proxy() | mg_http_reverse_proxy | func | void mg_http_reverse_proxy(struct mg_connection *nc, const struct http_message *hm, struct mg_str mount, struct mg_str upstream); |
Proxies a given request to a given upstream http server. The path prefix
in mount
will be stripped of the path requested to the upstream server,
e.g. if mount is /api and upstream is http://localhost:8001/foo
then an incoming request to /api/bar will cause a request to
http://localhost:8001/foo/bar
EXPERIMENTAL API. Please use http_serve_http + url_rewrites if a static mapping is good enough.