diff xml/ru/docs/http/ngx_http_js_module.xml @ 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 8868945bbe97
children 621daf1b77d0
line wrap: on
line diff
--- 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 для указанной переменной.