1
#include "source/extensions/path/match/uri_template/uri_template_match.h"
2

            
3
#include <map>
4
#include <string>
5
#include <utility>
6
#include <vector>
7

            
8
#include "source/common/http/path_utility.h"
9

            
10
#include "absl/status/statusor.h"
11
#include "absl/strings/str_split.h"
12
#include "absl/strings/string_view.h"
13
#include "re2/re2.h"
14

            
15
namespace Envoy {
16
namespace Extensions {
17
namespace UriTemplate {
18
namespace Match {
19

            
20
55
bool UriTemplateMatcher::match(absl::string_view path) const {
21
55
  return RE2::FullMatch(Http::PathUtil::removeQueryAndFragment(path), matching_pattern_regex_);
22
55
}
23

            
24
79
absl::string_view UriTemplateMatcher::uriTemplate() const { return path_template_; }
25

            
26
} // namespace Match
27
} // namespace UriTemplate
28
} // namespace Extensions
29
} // namespace Envoy