# HG changeset patch # User Yaroslav Zhuravlev # Date 1481639316 -10800 # Node ID 36cbfff92c6d08997ca60f9f4a5a578cf88cc433 # Parent 0882ccb0c00f2729f96aa9c52d3da9fb39b9fb1d Restricted context of js_set directive to http and stream only. diff -r 0882ccb0c00f -r 36cbfff92c6d xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml Thu Dec 08 19:03:22 2016 +0300 +++ b/xml/en/docs/http/ngx_http_js_module.xml Tue Dec 13 17:28:36 2016 +0300 @@ -9,7 +9,7 @@ + rev="4">
@@ -58,18 +58,19 @@ 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; } } @@ -159,8 +160,6 @@ $variable function http -server -location Sets an nginScript function for the specified variable. diff -r 0882ccb0c00f -r 36cbfff92c6d xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml Thu Dec 08 19:03:22 2016 +0300 +++ b/xml/en/docs/stream/ngx_stream_js_module.xml Tue Dec 13 17:28:36 2016 +0300 @@ -9,7 +9,7 @@ + rev="4">
@@ -58,15 +58,14 @@ 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 @@ $variable function stream -server Sets an nginScript function for the specified variable. diff -r 0882ccb0c00f -r 36cbfff92c6d xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml Thu Dec 08 19:03:22 2016 +0300 +++ b/xml/ru/docs/http/ngx_http_js_module.xml Tue Dec 13 17:28:36 2016 +0300 @@ -9,7 +9,7 @@ + rev="4">
@@ -58,18 +58,19 @@ 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; } } @@ -160,8 +161,6 @@ $переменная функция http -server -location Задаёт функцию nginScript для указанной переменной. diff -r 0882ccb0c00f -r 36cbfff92c6d xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml Thu Dec 08 19:03:22 2016 +0300 +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml Tue Dec 13 17:28:36 2016 +0300 @@ -9,7 +9,7 @@ + rev="4">
@@ -58,15 +58,14 @@ 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 @@ $переменная функция stream -server Задаёт функцию nginScript для указанной переменной.