Mercurial > hg > nginx-site
changeset 2845:a3aee2697d4e
Documented directives for Fetch API in njs.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 05 May 2022 18:31:47 +0100 |
parents | eb11724745e3 |
children | fdf1464e1977 |
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, 266 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_js_module.xml Wed May 04 22:40:12 2022 +0100 +++ b/xml/en/docs/http/ngx_http_js_module.xml Thu May 05 18:31:47 2022 +0100 @@ -9,7 +9,7 @@ <module name="Module ngx_http_js_module" link="/en/docs/http/ngx_http_js_module.html" lang="en" - rev="34"> + rev="35"> <section id="summary"> @@ -244,6 +244,22 @@ </directive> +<directive name="js_fetch_buffer_size"> +<syntax><value>size</value></syntax> +<default>16k</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Sets the <value>size</value> of the buffer used for reading and writing +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_ciphers"> <syntax><value>ciphers</value></syntax> <default>HIGH:!aNULL:!MD5</default> @@ -267,6 +283,22 @@ </directive> +<directive name="js_fetch_max_response_buffer_size"> +<syntax><value>size</value></syntax> +<default>1m</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Sets the maximum <value>size</value> of the response received +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_protocols"> <syntax> [<literal>TLSv1</literal>] @@ -287,6 +319,25 @@ </directive> +<directive name="js_fetch_timeout"> +<syntax><value>time</value></syntax> +<default>60s</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Defines a timeout for reading and writing +for <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +The timeout is set only between two successive read/write operations, +not for the whole response. +If no data is transmitted within this time, the connection is closed. +</para> + +</directive> + + <directive name="js_fetch_trusted_certificate"> <syntax><value>file</value></syntax> <default/> @@ -306,6 +357,22 @@ </directive> +<directive name="js_fetch_verify"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Enables or disables verification of the HTTPS server certificate +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_verify_depth"> <syntax><value>number</value></syntax> <default>100</default>
--- a/xml/en/docs/stream/ngx_stream_js_module.xml Wed May 04 22:40:12 2022 +0100 +++ b/xml/en/docs/stream/ngx_stream_js_module.xml Thu May 05 18:31:47 2022 +0100 @@ -9,7 +9,7 @@ <module name="Module ngx_stream_js_module" link="/en/docs/stream/ngx_stream_js_module.html" lang="en" - rev="30"> + rev="31"> <section id="summary"> @@ -145,6 +145,21 @@ </directive> +<directive name="js_fetch_buffer_size"> +<syntax><value>size</value></syntax> +<default>16k</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Sets the <value>size</value> of the buffer used for reading and writing +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_ciphers"> <syntax><value>ciphers</value></syntax> <default>HIGH:!aNULL:!MD5</default> @@ -166,6 +181,21 @@ </directive> +<directive name="js_fetch_max_response_buffer_size"> +<syntax><value>size</value></syntax> +<default>1m</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Sets the maximum <value>size</value> of the response received +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_protocols"> <syntax> [<literal>TLSv1</literal>] @@ -185,6 +215,24 @@ </directive> +<directive name="js_fetch_timeout"> +<syntax><value>time</value></syntax> +<default>60s</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Defines a timeout for reading and writing +for <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +The timeout is set only between two successive read/write operations, +not for the whole response. +If no data is transmitted within this time, the connection is closed. +</para> + +</directive> + + <directive name="js_fetch_trusted_certificate"> <syntax><value>file</value></syntax> <default/> @@ -203,6 +251,21 @@ </directive> +<directive name="js_fetch_verify"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Enables or disables verification of the HTTPS server certificate +with <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_verify_depth"> <syntax><value>number</value></syntax> <default>100</default>
--- a/xml/ru/docs/http/ngx_http_js_module.xml Wed May 04 22:40:12 2022 +0100 +++ b/xml/ru/docs/http/ngx_http_js_module.xml Thu May 05 18:31:47 2022 +0100 @@ -9,7 +9,7 @@ <module name="Модуль ngx_http_js_module" link="/ru/docs/http/ngx_http_js_module.html" lang="ru" - rev="34"> + rev="35"> <section id="summary"> @@ -244,6 +244,23 @@ </directive> +<directive name="js_fetch_buffer_size"> +<syntax><value>размер</value></syntax> +<default>16k</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт <value>размер</value> буфера, который будет использоваться +для чтения и записи для +<link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_ciphers"> <syntax><value>шифры</value></syntax> <default>HIGH:!aNULL:!MD5</default> @@ -266,6 +283,22 @@ </directive> +<directive name="js_fetch_max_response_buffer_size"> +<syntax><value>размер</value></syntax> +<default>1m</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт максимальный <value>размер</value> ответа, полученного +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_protocols"> <syntax> [<literal>TLSv1</literal>] @@ -286,6 +319,25 @@ </directive> +<directive name="js_fetch_timeout"> +<syntax><value>время</value></syntax> +<default>60s</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт таймаут при чтении и записи +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +Таймаут устанавливается не на всю передачу ответа, +а только между двумя операциями чтения. +Если по истечении этого времени данные не передавались, соединение закрывается. +</para> + +</directive> + + <directive name="js_fetch_trusted_certificate"> <syntax><value>файл</value></syntax> <default/> @@ -305,6 +357,22 @@ </directive> +<directive name="js_fetch_verify"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>http</context> +<context>server</context> +<context>location</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Разрешает или запрещает проверку сертификата HTTPS-сервера +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_verify_depth"> <syntax><value>число</value></syntax> <default>100</default>
--- a/xml/ru/docs/stream/ngx_stream_js_module.xml Wed May 04 22:40:12 2022 +0100 +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml Thu May 05 18:31:47 2022 +0100 @@ -9,7 +9,7 @@ <module name="Модуль ngx_stream_js_module" link="/ru/docs/stream/ngx_stream_js_module.html" lang="ru" - rev="30"> + rev="31"> <section id="summary"> @@ -145,6 +145,22 @@ </directive> +<directive name="js_fetch_buffer_size"> +<syntax><value>размер</value></syntax> +<default>16k</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт <value>размер</value> буфера, который будет использоваться +для чтения и записи для +<link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_ciphers"> <syntax><value>шифры</value></syntax> <default>HIGH:!aNULL:!MD5</default> @@ -166,6 +182,21 @@ </directive> +<directive name="js_fetch_max_response_buffer_size"> +<syntax><value>размер</value></syntax> +<default>1m</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт максимальный <value>размер</value> ответа, полученного +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_protocols"> <syntax> [<literal>TLSv1</literal>] @@ -185,6 +216,24 @@ </directive> +<directive name="js_fetch_timeout"> +<syntax><value>время</value></syntax> +<default>60s</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Задаёт таймаут при чтении и записи +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +Таймаут устанавливается не на всю передачу ответа, +а только между двумя операциями чтения. +Если по истечении этого времени данные не передавались, соединение закрывается. +</para> + +</directive> + + <directive name="js_fetch_trusted_certificate"> <syntax><value>файл</value></syntax> <default/> @@ -203,6 +252,21 @@ </directive> +<directive name="js_fetch_verify"> +<syntax><literal>on</literal> | <literal>off</literal></syntax> +<default>on</default> +<context>stream</context> +<context>server</context> +<appeared-in>0.7.4</appeared-in> + +<para> +Разрешает или запрещает проверку сертификата HTTPS-сервера +при помощи <link doc="../njs/reference.xml" id="ngx_fetch">Fetch API</link>. +</para> + +</directive> + + <directive name="js_fetch_verify_depth"> <syntax><value>число</value></syntax> <default>100</default>