flow

flow #

Description #

The flow filter is used to redirect to or execute one or a series of other flows.

Configuration Example #

A simple example is as follows:

flow:
  - name: flow
    filter:
      - flow:
          flows:
          - request_logging

Context mapped flow:

flow:
  - name: dns-flow
    filter:
      - flow:
          ignore_undefined_flow: true
          context_flow:
            context: _ctx.request.host
            context_parse_pattern: (?P<uuid>^[0-9a-z_\-]+)\.
            flow_id_template: flow_$[[uuid]]
      - set_response:
          status: 503
          content_type: application/json
          body: '{"message":"invalid HOST"}'

More information about context, please refer to Context .

Parameter Description #

NameTypeDescription
flowstringFlow ID, the definition of how requests will be executed
flowsarrayFlow ID, in the array format. You can specify multiple flows, which are executed in sequence
ignore_undefined_flowboolIgnore the undefined flow
context_flow.contextstringThe context to use for mapping flow_id
context_flow.context_parse_patternstringThe regexp pattern used to extract named variables from context value
context_flow.flow_id_templatestringThe string template used to rendering flow_id
context_flow.continuestringWill continue next filter after executed the context mapped flow, default false
Edit Edit this page