Mercurial > hg > nginx-site
diff xml/en/docs/njs/reference.xml @ 2693:3cbd6e440581
Documented the js_var directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 29 Mar 2021 19:40:27 +0100 |
parents | 7e271437f12e |
children | f82f16e327f2 |
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml Thu Mar 25 19:24:37 2021 +0000 +++ b/xml/en/docs/njs/reference.xml Mon Mar 29 19:40:27 2021 +0100 @@ -9,7 +9,7 @@ <article name="Reference" link="/en/docs/njs/reference.html" lang="en" - rev="72"> + rev="73"> <section id="summary"> @@ -458,10 +458,26 @@ <tag-desc> nginx variables object, writable (since <link doc="changes.xml" id="njs0.2.8">0.2.8</link>). -A variable can be writable only -if it is referenced in nginx configuration file. + +<para> +A variable is writable if: +<list type="bullet"> + +<listitem> +it was created using the <literal>js_var</literal> directive for +<link doc="../http/ngx_http_js_module.xml" id="js_var">http</link> or +<link doc="../stream/ngx_stream_js_module.xml" id="js_var">stream</link> +(since <link doc="changes.xml" id="njs0.5.3">0.5.3</link>) +</listitem> + +<listitem> +it is referenced in nginx configuration file +</listitem> + +</list> Even so, some embedded variables still cannot be assigned a value (for example, <link doc="../http/ngx_http_core_module.xml" id="var_http_"><literal>$http_</literal></link>). +</para> </tag-desc> <tag-name id="r_warn"><literal>r.warn(<value>string</value>)</literal></tag-name>