diff --git a/source/common/router/config_impl.cc b/source/common/router/config_impl.cc index 00abecd05ba32..b140f24bc2ad1 100644 --- a/source/common/router/config_impl.cc +++ b/source/common/router/config_impl.cc @@ -669,7 +669,7 @@ RouteEntryImplBase::RouteEntryImplBase(const VirtualHostImpl& vhost, "Specify only one of prefix_rewrite, regex_rewrite or path_rewrite_policy"); } - if (!route.route().prefix_rewrite().empty() && path_matcher_ != nullptr) { + if (!prefix_rewrite_.empty() && path_matcher_ != nullptr) { throw EnvoyException("Cannot use prefix_rewrite with matcher extension"); }