Traffic Label Configuration
Configuration reference for the Traffic Label plugin (`traffic-label`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.
Parameters
See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.
rules — array[object] · required · since APISIX 3.17.0 · API7 Gateway 3.1.0
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.
match — array[array] · required · since APISIX 3.17.0 · API7 Gateway 3.1.0
An array of one or more matching conditions in the form of APISIX expressions (opens in Apache APISIX docs).
actions — array[object] · required · since APISIX 3.17.0 · API7 Gateway 3.1.0
An array of one or more actions to be executed when a condition is successfully matched.
set_headers — object · optional · since APISIX 3.17.0 · API7 Gateway 3.1.0
One or more request headers to apply to requests in the format of {"name": "value", ...}, where value could be a built-in variable (opens in Apache APISIX docs). If a header of the same name already exists, it will be overwritten.
weight — integer · optional · default: 1 · since APISIX 3.17.0 · API7 Gateway 3.1.0
The weight of action distribution.