Stream JavaScript directives
js_set (stream-js)
Associates a stream variable with a synchronous handler.
Formal Syntax & Structure
nginx syntaxnginx
js_set $variable module.function [nocache];Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| variable | $variable | Name the computed configuration variable. |
| handler | module.function | Reference a synchronous handler. |
| nocache | literal nocache | Reevaluate on each reference since njs 0.8.6; rewrite set has fixed-length limitations. |
Working Example
Example Snippetnginx
js_set $label session.label;