summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_route.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2020-03-06 18:28:54 +0300
committerIgor Sysoev <igor@sysoev.ru>2020-03-06 18:28:54 +0300
commit7935ea45436ea832344cec945d39a61ae91f2a69 (patch)
tree6ae820cdaf2204331300bb967090f23b61ed4d0a /src/nxt_http_route.c
parent794248090a74f31cbfcf24ea8c835df2d4d21073 (diff)
downloadunit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.gz
unit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.bz2
Round robin upstream added.
Diffstat (limited to 'src/nxt_http_route.c')
-rw-r--r--src/nxt_http_route.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c
index df52894a..d7f20bcb 100644
--- a/src/nxt_http_route.c
+++ b/src/nxt_http_route.c
@@ -1114,6 +1114,12 @@ nxt_http_action_resolve(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
nxt_router_listener_application(tmcf, &name, action);
nxt_router_app_use(task, action->u.application, 1);
+ } else if (nxt_str_start(&name, "upstreams/", 10)) {
+ name.length -= 10;
+ name.start += 10;
+
+ nxt_upstream_find(tmcf->router_conf->upstreams, &name, action);
+
} else if (nxt_str_start(&name, "routes", 6)) {
if (name.length == 6) {