diff --git a/monolake-services/src/http/handlers/route.rs b/monolake-services/src/http/handlers/route.rs index bb38ac4..978ede7 100644 --- a/monolake-services/src/http/handlers/route.rs +++ b/monolake-services/src/http/handlers/route.rs @@ -178,6 +178,10 @@ where Ok(route) => { let route = route.value; tracing::info!("the route id: {}", route.id); + if route.upstreams.len() == 1 { + rewrite_request(&mut request, &route.upstreams[0]); + return self.inner.handle(request, ctx).await; + } use rand::seq::SliceRandom; let upstream = route .upstreams