# Traffic Label Configuration

The `traffic-label` plugin evaluates request expressions and applies weighted request-header changes for conditional traffic management.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* rules

  array\[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.

  * match

    array\[array]

    ***

    An array of one or more matching conditions in the form of [APISIX expressions](https://docs.api7.ai/apisix/reference/apisix-expressions.md). If omitted, the rule matches every request.

  * actions

    array\[object]

    required

    ***

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

    * set\_headers

      object

      ***

      One or more request headers to apply to requests in the format of `{"name": "value", ...}`, where `value` could be a [built-in variable](https://docs.api7.ai/apisix/reference/built-in-variables.md). If a header of the same name already exists, it will be overwritten.

    * weight

      integer

      default: `1`

      ***

      The weight of action distribution.
