Mercurial > hg > nginx-site
diff xml/en/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/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.