HTTP Plus key-value directives
keyval
HTTP context; commercial. Looks up a key in the named shared zone and assigns the value to a variable. Missing-key policy must be explicit.
Formal Syntax & Structure
nginx syntaxnginx
keyval key $variable zone=name;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| key | expression | Lookup key. |
| variable | $variable | Destination variable. |
| zone | zone=name | Previously defined key-value zone. |
Working Example
Example Snippetnginx
keyval $arg_region $region_label zone=labels;