changeset 1858:36cbfff92c6d

Restricted context of js_set directive to http and stream only.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 13 Dec 2016 17:28:36 +0300
parents 0882ccb0c00f
children 5cd4964fbc5f
files xml/en/docs/http/ngx_http_js_module.xml xml/en/docs/stream/ngx_stream_js_module.xml xml/ru/docs/http/ngx_http_js_module.xml xml/ru/docs/stream/ngx_stream_js_module.xml
diffstat 4 files changed, 20 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_js_module.xml
+++ b/xml/en/docs/http/ngx_http_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_http_js_module"
         link="/en/docs/http/ngx_http_js_module.html"
         lang="en"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -58,18 +58,19 @@ The module is experimental, caveat empto
 <example>
 js_include http.js;
 
+js_set $foo     foo;
+js_set $summary summary;
+
 server {
     listen 8000;
 
     location / {
-        js_set     $foo  foo;
         add_header X-Foo $foo;
         js_content baz;
     }
 
     location /summary {
-        js_set $summary summary;
-        return 200      $summary;
+        return 200 $summary;
     }
 }
 </example>
@@ -159,8 +160,6 @@ Sets an nginScript function as a locatio
 <value>$variable</value> <value>function</value></syntax>
 <default/>
 <context>http</context>
-<context>server</context>
-<context>location</context>
 
 <para>
 Sets an nginScript function for the specified variable.
--- a/xml/en/docs/stream/ngx_stream_js_module.xml
+++ b/xml/en/docs/stream/ngx_stream_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_stream_js_module"
         link="/en/docs/stream/ngx_stream_js_module.html"
         lang="en"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -58,15 +58,14 @@ The module is experimental, caveat empto
 stream {
     js_include stream.js;
 
+    js_set $foo foo;
+    js_set $bar bar;
+
     server {
         listen 12345;
 
         js_preread qux;
-
-        js_set $foo foo;
-        js_set $bar bar;
-
-        return foo;
+        return     foo;
     }
 
     server {
@@ -230,7 +229,6 @@ Sets an nginScript function which will b
 <value>$variable</value> <value>function</value></syntax>
 <default/>
 <context>stream</context>
-<context>server</context>
 
 <para>
 Sets an nginScript function for the specified variable.
--- a/xml/ru/docs/http/ngx_http_js_module.xml
+++ b/xml/ru/docs/http/ngx_http_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_http_js_module"
         link="/ru/docs/http/ngx_http_js_module.html"
         lang="ru"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -58,18 +58,19 @@ hg clone http://hg.nginx.org/njs
 <example>
 js_include http.js;
 
+js_set $foo     foo;
+js_set $summary summary;
+
 server {
     listen 8000;
 
     location / {
-        js_set     $foo  foo;
         add_header X-Foo $foo;
         js_content baz;
     }
 
     location /summary {
-        js_set $summary summary;
-        return 200      $summary;
+        return 200 $summary;
     }
 }
 </example>
@@ -160,8 +161,6 @@ function baz(req, res) {
 <value>$переменная</value> <value>функция</value></syntax>
 <default/>
 <context>http</context>
-<context>server</context>
-<context>location</context>
 
 <para>
 Задаёт функцию nginScript для указанной переменной.
--- a/xml/ru/docs/stream/ngx_stream_js_module.xml
+++ b/xml/ru/docs/stream/ngx_stream_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_stream_js_module"
         link="/ru/docs/stream/ngx_stream_js_module.html"
         lang="ru"
-        rev="3">
+        rev="4">
 
 <section id="summary">
 
@@ -58,15 +58,14 @@ hg clone http://hg.nginx.org/njs
 stream {
     js_include stream.js;
 
+    js_set $foo foo;
+    js_set $bar bar;
+
     server {
         listen 12345;
 
         js_preread qux;
-
-        js_set $foo foo;
-        js_set $bar bar;
-
-        return foo;
+        return     foo;
     }
 
     server {
@@ -231,7 +230,6 @@ function xyz(s) {
 <value>$переменная</value> <value>функция</value></syntax>
 <default/>
 <context>stream</context>
-<context>server</context>
 
 <para>
 Задаёт функцию nginScript для указанной переменной.