diff --git a/src/route.rs b/src/route.rs index da71b747a..6f9e8c006 100644 --- a/src/route.rs +++ b/src/route.rs @@ -104,9 +104,12 @@ impl<'a, State: Clone + Send + Sync + 'static> Route<'a, State> { State: Clone + Send + Sync + 'static, InnerState: Clone + Send + Sync + 'static, { + let prefix = self.prefix; + self.prefix = true; self.all(service); - self.prefix = false; + self.prefix = prefix; + self }