API7 Docs
Traffic ManagementTraffic Label

Traffic Label Configuration

Parameters

See plugin common configurations for configuration options available to all plugins.

  • rulesarray[object] · required

    An array of one or more pairs of matching conditions and actions to be executed.

    Rules are evaluated sequentially. For a matching rule, the plugin selects one action by weight. When the selected action contains set_headers, it is applied and evaluation stops. If the selected object contains only weight, evaluation continues to the next rule.

    • matcharray[array] · required

      An array of one or more matching conditions in the form of APISIX expressions.

    • actionsarray[object] · required

      An array of one or more actions to be executed when a condition is successfully matched.

      • set_headersobject · optional

        One or more request headers to apply to requests in the format of {"name": "value", ...}, where value could be a built-in variable. If a header of the same name already exists, it will be overwritten.

      • weightinteger · optional · default: 1

        The weight of action distribution.