Add warning when path filter is empty
@@ -596,6 +596,11 @@ impl PathFilter {
/// Create new `PathFilter`.
pub fn new(value: impl Into<String>) -> Self {
let raw_value = value.into();
+ if raw_value.is_empty() {
+ tracing::warn!("you should not add empty string as path filter");
+ } else if raw_value == "/" {
+ tracing::warn!("you should not add '/' as path filter");
+ }
let mut parser = PathParser::new(&raw_value);
let path_parts = match parser.parse() {
Ok(path_parts) => path_parts,
