comparison 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
comparison
equal deleted inserted replaced
1857:0882ccb0c00f 1858:36cbfff92c6d
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8 8
9 <module name="Модуль ngx_http_js_module" 9 <module name="Модуль ngx_http_js_module"
10 link="/ru/docs/http/ngx_http_js_module.html" 10 link="/ru/docs/http/ngx_http_js_module.html"
11 lang="ru" 11 lang="ru"
12 rev="3"> 12 rev="4">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 Модуль <literal>ngx_http_js_module</literal> позволяет задавать 17 Модуль <literal>ngx_http_js_module</literal> позволяет задавать
56 56
57 <para> 57 <para>
58 <example> 58 <example>
59 js_include http.js; 59 js_include http.js;
60 60
61 js_set $foo foo;
62 js_set $summary summary;
63
61 server { 64 server {
62 listen 8000; 65 listen 8000;
63 66
64 location / { 67 location / {
65 js_set $foo foo;
66 add_header X-Foo $foo; 68 add_header X-Foo $foo;
67 js_content baz; 69 js_content baz;
68 } 70 }
69 71
70 location /summary { 72 location /summary {
71 js_set $summary summary; 73 return 200 $summary;
72 return 200 $summary;
73 } 74 }
74 } 75 }
75 </example> 76 </example>
76 </para> 77 </para>
77 78
158 <directive name="js_set"> 159 <directive name="js_set">
159 <syntax> 160 <syntax>
160 <value>$переменная</value> <value>функция</value></syntax> 161 <value>$переменная</value> <value>функция</value></syntax>
161 <default/> 162 <default/>
162 <context>http</context> 163 <context>http</context>
163 <context>server</context>
164 <context>location</context>
165 164
166 <para> 165 <para>
167 Задаёт функцию nginScript для указанной переменной. 166 Задаёт функцию nginScript для указанной переменной.
168 </para> 167 </para>
169 168