Module path_matcher

Module path_matcher 

Source

Functions§

matches_pattern
Check if a path matches a wildcard pattern
matches_pattern_with_method
Check if a request (method + path) matches a pattern Pattern can be just a path or “METHOD /path” Examples: matches_pattern_with_method(Some(“POST”), “/api/users”, “POST /api/”) -> true matches_pattern_with_method(Some(“GET”), “/api/users”, “POST /api/”) -> false matches_pattern_with_method(Some(“GET”), “/api/users”, “/api/*”) -> true (no method constraint)
should_cache_path
Check if a request should be cached based on include and exclude patterns