Mercurial > hg > nginx-site
comparison xml/en/docs/stream/ngx_stream_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="Module ngx_stream_js_module" | 9 <module name="Module ngx_stream_js_module" |
10 link="/en/docs/stream/ngx_stream_js_module.html" | 10 link="/en/docs/stream/ngx_stream_js_module.html" |
11 lang="en" | 11 lang="en" |
12 rev="3"> | 12 rev="4"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 The <literal>ngx_stream_js_module</literal> module is used to implement | 17 The <literal>ngx_stream_js_module</literal> module is used to implement |
56 <para> | 56 <para> |
57 <example> | 57 <example> |
58 stream { | 58 stream { |
59 js_include stream.js; | 59 js_include stream.js; |
60 | 60 |
61 js_set $foo foo; | |
62 js_set $bar bar; | |
63 | |
61 server { | 64 server { |
62 listen 12345; | 65 listen 12345; |
63 | 66 |
64 js_preread qux; | 67 js_preread qux; |
65 | 68 return foo; |
66 js_set $foo foo; | |
67 js_set $bar bar; | |
68 | |
69 return foo; | |
70 } | 69 } |
71 | 70 |
72 server { | 71 server { |
73 listen 12346; | 72 listen 12346; |
74 | 73 |
228 <directive name="js_set"> | 227 <directive name="js_set"> |
229 <syntax> | 228 <syntax> |
230 <value>$variable</value> <value>function</value></syntax> | 229 <value>$variable</value> <value>function</value></syntax> |
231 <default/> | 230 <default/> |
232 <context>stream</context> | 231 <context>stream</context> |
233 <context>server</context> | |
234 | 232 |
235 <para> | 233 <para> |
236 Sets an nginScript function for the specified variable. | 234 Sets an nginScript function for the specified variable. |
237 </para> | 235 </para> |
238 | 236 |