request_path_filter

request_path_filter #

Description #

The request_path_filter is used to filter traffic based on request path.

Configuration Example #

A simple example is as follows:

flow:
  - name: test
    filter:
      - request_path_filter:
          must: #must match all rules to continue
            prefix:
              - /medcl
            contain:
              - _search
            suffix:
              - _count
              - _refresh
            wildcard:
              - /*/_refresh
            regex:
              - ^/m[\w]+dcl
          must_not: # any match will be filtered
            prefix:
              - /.kibana
              - /_security
              - /_security
              - /gateway_requests*
              - /.reporting
              - /_monitoring/bulk
            contain:
              - _search
            suffix:
              - _count
              - _refresh
            wildcard:
              - /*/_refresh
            regex:
              - ^/m[\w]+dcl
          should:
            prefix:
              - /medcl
            contain:
              - _search
              - _async_search
            suffix:
              - _refresh
            wildcard:
              - /*/_refresh
            regex:
              - ^/m[\w]+dcl

Parameter Description #

NameTypeDescription
must.*objectRequests are allowed to pass through only when all conditions are met.
must_not.*objectRequests are allowed to pass through only when none of the conditions are met.
should.*objectRequests are allowed to pass through when any condition is met.
*.prefixarrayWhether a request begins with a specific character
*.suffixarrayWhether a request ends with a specific character
*.containarrayWhether a request contains a specific character
*.wildcardarrayWhether a request meets pattern matching rules
*.regexarrayWhether a request meets regular expression matching rules
actionstringProcessing action after filtering conditions are met. The value can be set to deny or redirect_flow and the default value is deny.
statusintStatus code returned after the user-defined mode is matched
messagestringMessage text returned in user-defined deny mode
flowstringID of the flow executed in user-defined redirect_flow mode

Note: If only the should condition is met, requests are allowed to pass through only when at least one item in should is met.

Edit Edit this page