# HG changeset patch # User Yaroslav Zhuravlev # Date 1617043227 -3600 # Node ID 3cbd6e4405813393cbee02b74492f600611f8990 # Parent 3fe54f96476ab00a5eb1e0ed1e04fb1aef65895e Documented the js_var directive. diff -r 3fe54f96476a -r 3cbd6e440581 xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml Thu Mar 25 19:24:37 2021 +0000 +++ b/xml/en/docs/http/ngx_http_js_module.xml Mon Mar 29 19:40:27 2021 +0100 @@ -9,7 +9,7 @@ + rev="28">
@@ -321,6 +321,25 @@ + + +$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 -r 3fe54f96476a -r 3cbd6e440581 xml/en/docs/njs/reference.xml --- 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 @@
+ rev="73">
@@ -458,10 +458,26 @@ 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 -r 3fe54f96476a -r 3cbd6e440581 xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml Thu Mar 25 19:24:37 2021 +0000 +++ b/xml/en/docs/stream/ngx_stream_js_module.xml Mon Mar 29 19:40:27 2021 +0100 @@ -9,7 +9,7 @@ + rev="26">
@@ -282,6 +282,25 @@ + + +$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 -r 3fe54f96476a -r 3cbd6e440581 xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml Thu Mar 25 19:24:37 2021 +0000 +++ b/xml/ru/docs/http/ngx_http_js_module.xml Mon Mar 29 19:40:27 2021 +0100 @@ -9,7 +9,7 @@ + rev="28">
@@ -322,6 +322,25 @@ + + +$переменная [значение] + +http +0.5.3 + + +Объявляет +перезаписываемую +переменную. +В качестве значения можно использовать текст, переменные и их комбинации. +Переменная не перезаписывается после перенаправления, +в отличие от переменных, созданных при помощи +директивы . + + + +
diff -r 3fe54f96476a -r 3cbd6e440581 xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml Thu Mar 25 19:24:37 2021 +0000 +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml Mon Mar 29 19:40:27 2021 +0100 @@ -9,7 +9,7 @@ + rev="26">
@@ -283,6 +283,25 @@ + + +$переменная [значение] + +stream +0.5.3 + + +Объявляет +перезаписываемую +переменную. +В качестве значения можно использовать текст, переменные и их комбинации. +Переменная не перезаписывается после перенаправления, +в отличие от переменных, созданных при помощи +директивы . + + + +