Attach Consumer Label Configuration
Configuration reference for the Attach Consumer Label plugin (`attach-consumer-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.
headers — object · required · since APISIX 3.11.0 · API7 Gateway 3.2.15.0
Key-value pairs of consumer labels to attach to request headers, where the key is a request header name, such as X-Consumer-Role, and the value references a custom label key, such as $role. The value must start with a dollar sign ($).
The gateway clears every configured header before resolving its label. If a referenced label is absent, the upstream receives no value for that header, including any value supplied by the client. This behavior was introduced in API7 Gateway 3.9.16 and 3.10.2, and in APISIX 3.18.0. In earlier versions, an absent label does not overwrite a client-supplied header value.