diff --git a/src/core/client/proxy/matcher.rs b/src/core/client/proxy/matcher.rs index c47b89afa..615d6544e 100644 --- a/src/core/client/proxy/matcher.rs +++ b/src/core/client/proxy/matcher.rs @@ -113,11 +113,15 @@ impl Matcher { return None; } - match dst.scheme_str() { - Some("http") => self.http.clone(), - Some("https") => self.https.clone(), - _ => None, + if dst.scheme() == Some(&http::uri::Scheme::HTTP) { + return self.http.clone(); } + + if dst.scheme() == Some(&http::uri::Scheme::HTTPS) { + return self.https.clone(); + } + + None } }