changeset 2882:986e1f930e3b

Documented server, location, if contexts for some js directives.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 18 Aug 2022 15:44:39 +0100
parents e59e8645055d
children 4959250ba429
files xml/en/docs/http/ngx_http_js_module.xml xml/en/docs/stream/ngx_stream_js_module.xml xml/ru/docs/http/ngx_http_js_module.xml xml/ru/docs/stream/ngx_stream_js_module.xml
diffstat 4 files changed, 210 insertions(+), 4 deletions(-) [+]
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="35">
+        rev="36">
 
 <section id="summary">
 
@@ -152,6 +152,7 @@ export default {foo, summary, baz, hello
 [<value>buffer_type</value>=<value>string</value> | <value>buffer</value>]</syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 <appeared-in>0.5.2</appeared-in>
 
@@ -226,6 +227,14 @@ are not supported.
 </note>
 </para>
 
+<para>
+<note>
+The directive can be specified inside the
+<link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link> block
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -233,6 +242,7 @@ are not supported.
 <syntax><value>function</value> | <value>module.function</value></syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 
 <para>
@@ -241,6 +251,14 @@ Since <link doc="../njs/changes.xml" id=
 a module function can be referenced.
 </para>
 
+<para>
+<note>
+The directive can be specified inside the
+<link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link> block
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -393,6 +411,7 @@ with <link doc="../njs/reference.xml" id
 <syntax><value>function</value> | <value>module.function</value></syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 <appeared-in>0.5.1</appeared-in>
 
@@ -414,6 +433,14 @@ are not supported.
 </note>
 </para>
 
+<para>
+<note>
+The directive can be specified inside the
+<link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link> block
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -422,6 +449,8 @@ are not supported.
 <value>export_name from module.js</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.4.0</appeared-in>
 
 <para>
@@ -443,6 +472,14 @@ If the imported module exports <literal>
 Several <literal>js_import</literal> directives can be specified.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> and <literal>location</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -483,12 +520,22 @@ The <link id="js_import"/> directive sho
 <value>path</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.3.0</appeared-in>
 
 <para>
 Sets an additional path for njs modules.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> and <literal>location</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -498,6 +545,8 @@ Sets an additional path for njs modules.
 <value>module.function</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 
 <para>
 Sets an njs <literal>function</literal>
@@ -534,6 +583,14 @@ are not supported.
 </note>
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> and <literal>location</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -541,6 +598,8 @@ are not supported.
 <syntax><value>$variable</value> [<value>value</value>]</syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.5.3</appeared-in>
 
 <para>
@@ -553,6 +612,14 @@ unlike variables created with the
 <link doc="ngx_http_rewrite_module.xml" id="set"/> directive.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> and <literal>location</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 </section>
--- a/xml/en/docs/stream/ngx_stream_js_module.xml
+++ b/xml/en/docs/stream/ngx_stream_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Module ngx_stream_js_module"
         link="/en/docs/stream/ngx_stream_js_module.html"
         lang="en"
-        rev="32">
+        rev="33">
 
 <section id="summary">
 
@@ -381,6 +381,7 @@ are not supported.
 <value>export_name from module.js</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.4.0</appeared-in>
 
 <para>
@@ -402,6 +403,14 @@ If the imported module exports <literal>
 Several <literal>js_import</literal> directives can be specified.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -444,12 +453,21 @@ The <link id="js_import"/> directive sho
 <value>path</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.3.0</appeared-in>
 
 <para>
 Sets an additional path for njs modules.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -527,6 +545,7 @@ See
 <value>module.function</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 
 <para>
 Sets an njs <literal>function</literal>
@@ -563,6 +582,14 @@ are not supported.
 </note>
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -570,6 +597,7 @@ are not supported.
 <syntax><value>$variable</value> [<value>value</value>]</syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.5.3</appeared-in>
 
 <para>
@@ -579,6 +607,14 @@ variable.
 The value can contain text, variables, and their combination.
 </para>
 
+<para>
+<note>
+The directive can be specified on the
+<literal>server</literal> level
+since <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 </section>
--- 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="35">
+        rev="36">
 
 <section id="summary">
 
@@ -152,6 +152,7 @@ export default {foo, summary, baz, hello
 [<value>buffer_type</value>=<value>строка</value> | <value>буфер</value>]</syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 <appeared-in>0.5.2</appeared-in>
 
@@ -226,6 +227,14 @@ function filter(r, data, flags) {
 </note>
 </para>
 
+<para>
+<note>
+Директива может быть указана внутри
+блока <link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -233,6 +242,7 @@ function filter(r, data, flags) {
 <syntax><value>функция</value> | <value>модуль.функция</value></syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 
 <para>
@@ -241,6 +251,14 @@ function filter(r, data, flags) {
 можно ссылаться на функцию модуля.
 </para>
 
+<para>
+<note>
+Директива может быть указана внутри
+блока <link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -393,6 +411,7 @@ HTTPS-сертификата
 <syntax><value>функция</value> | <value>модуль.функция</value></syntax>
 <default/>
 <context>location</context>
+<context>if in location</context>
 <context>limit_except</context>
 <appeared-in>0.5.1</appeared-in>
 
@@ -414,6 +433,14 @@ HTTPS-сертификата
 </note>
 </para>
 
+<para>
+<note>
+Директива может быть указана внутри
+блока <link doc="../http/ngx_http_rewrite_module.xml" id="if">if</link>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -422,6 +449,8 @@ HTTPS-сертификата
 <value>имя_экспорта from модуль.js</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.4.0</appeared-in>
 
 <para>
@@ -444,6 +473,14 @@ js_import http.js;
 Директив <literal>js_import</literal> может быть несколько.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal> и <literal>location</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -484,12 +521,22 @@ function version(r) {
 <value>путь</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.3.0</appeared-in>
 
 <para>
 Задаёт дополнительный путь для модулей njs.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal> и <literal>location</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -499,6 +546,8 @@ function version(r) {
 <value>модуль.функция</value></syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 
 <para>
 Задаёт <literal>функцию</literal> njs
@@ -535,6 +584,14 @@ function version(r) {
 </note>
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal> и <literal>location</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -542,6 +599,8 @@ function version(r) {
 <syntax><value>$переменная</value> [<value>значение</value>]</syntax>
 <default/>
 <context>http</context>
+<context>server</context>
+<context>location</context>
 <appeared-in>0.5.3</appeared-in>
 
 <para>
@@ -554,6 +613,14 @@ function version(r) {
 директивы <link doc="ngx_http_rewrite_module.xml" id="set"/>.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal> и <literal>location</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 </section>
--- a/xml/ru/docs/stream/ngx_stream_js_module.xml
+++ b/xml/ru/docs/stream/ngx_stream_js_module.xml
@@ -9,7 +9,7 @@
 <module name="Модуль ngx_stream_js_module"
         link="/ru/docs/stream/ngx_stream_js_module.html"
         lang="ru"
-        rev="32">
+        rev="33">
 
 <section id="summary">
 
@@ -382,6 +382,7 @@ HTTPS-сертификата
 <value>имя_экспорта from модуль.js</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.4.0</appeared-in>
 
 <para>
@@ -404,6 +405,14 @@ js_import stream.js;
 Директив <literal>js_import</literal> может быть несколько.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -511,12 +520,21 @@ function address(s) {
 <value>путь</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.3.0</appeared-in>
 
 <para>
 Задаёт дополнительный путь для модулей njs.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -526,6 +544,7 @@ function address(s) {
 <value>модуль.функция</value></syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 
 <para>
 Задаёт <literal>функцию</literal> njs
@@ -562,6 +581,14 @@ function address(s) {
 </note>
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 
@@ -569,6 +596,7 @@ function address(s) {
 <syntax><value>$переменная</value> [<value>значение</value>]</syntax>
 <default/>
 <context>stream</context>
+<context>server</context>
 <appeared-in>0.5.3</appeared-in>
 
 <para>
@@ -578,6 +606,14 @@ function address(s) {
 В качестве значения можно использовать текст, переменные и их комбинации.
 </para>
 
+<para>
+<note>
+Директива может быть указана
+на уровне <literal>server</literal>
+начиная с <link doc="../njs/changes.xml" id="njs0.7.7">0.7.7</link>.
+</note>
+</para>
+
 </directive>
 
 </section>