# HG changeset patch # User Yaroslav Zhuravlev # Date 1617043227 -3600 # Node ID 3cbd6e4405813393cbee02b74492f600611f8990 # Parent 3fe54f96476ab00a5eb1e0ed1e04fb1aef65895e Documented the js_var directive. diff --git a/xml/en/docs/http/ngx_http_js_module.xml b/xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml +++ b/xml/en/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="28">
@@ -321,6 +321,25 @@ right before the request is freed. + + +$variable [value] + +http +0.5.3 + + +Declares +a writable +variable. +The value can contain text, variables, and their combination. +The variable is not overwritten after a redirect +unlike variables created with the + directive. + + + +
diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="73">
@@ -458,10 +458,26 @@ writable nginx variables object, writable (since 0.2.8). -A variable can be writable only -if it is referenced in nginx configuration file. + + +A variable is writable if: + + + +it was created using the js_var directive for +http or +stream +(since 0.5.3) + + + +it is referenced in nginx configuration file + + + Even so, some embedded variables still cannot be assigned a value (for example, $http_). + r.warn(string) diff --git a/xml/en/docs/stream/ngx_stream_js_module.xml b/xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml +++ b/xml/en/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="26">
@@ -282,6 +282,25 @@ right before the request is freed. + + +$variable [value] + +stream +0.5.3 + + +Declares +a writable +variable. +The value can contain text, variables, and their combination. +The variable is not overwritten after a redirect +unlike variables created with the + directive. + + + +
diff --git a/xml/ru/docs/http/ngx_http_js_module.xml b/xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml +++ b/xml/ru/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ + rev="28">
@@ -322,6 +322,25 @@ function version(r) { + + +$переменная [значение] + +http +0.5.3 + + +Объявляет +перезаписываемую +переменную. +В качестве значения можно использовать текст, переменные и их комбинации. +Переменная не перезаписывается после перенаправления, +в отличие от переменных, созданных при помощи +директивы . + + + +
diff --git a/xml/ru/docs/stream/ngx_stream_js_module.xml b/xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml @@ -9,7 +9,7 @@ + rev="26">
@@ -283,6 +283,25 @@ function address(s) { + + +$переменная [значение] + +stream +0.5.3 + + +Объявляет +перезаписываемую +переменную. +В качестве значения можно использовать текст, переменные и их комбинации. +Переменная не перезаписывается после перенаправления, +в отличие от переменных, созданных при помощи +директивы . + + + +