Mercurial > hg > nginx-site
changeset 2784:65591dd31d64
Updated Example Configuration in ngx_http_js_module.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 19 Oct 2021 15:12:08 +0100 |
parents | 87713cb4be56 |
children | 64d030947d40 |
files | xml/en/docs/http/ngx_http_js_module.xml xml/ru/docs/http/ngx_http_js_module.xml |
diffstat | 2 files changed, 10 insertions(+), 6 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="31"> + rev="32"> <section id="summary"> @@ -41,6 +41,8 @@ http { js_set $summary http.summary; js_set $hash http.hash; + resolver 10.0.0.1; + server { listen 8000; @@ -124,8 +126,8 @@ function hello(r) { // since 0.7.0 async function fetch(r) { - let results = await Promise.all([ngx.fetch('http://nginx.org/'), - ngx.fetch('http://nginx.org/en/')]); + let results = await Promise.all([ngx.fetch('https://nginx.org/'), + ngx.fetch('https://nginx.org/en/')]); r.return(200, JSON.stringify(results, undefined, 4)); }
--- 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="31"> + rev="32"> <section id="summary"> @@ -41,6 +41,8 @@ http { js_set $summary http.summary; js_set $hash http.hash; + resolver 10.0.0.1; + server { listen 8000; @@ -124,8 +126,8 @@ function hello(r) { // начиная с версии 0.7.0 async function fetch(r) { - let results = await Promise.all([ngx.fetch('http://nginx.org/'), - ngx.fetch('http://nginx.org/en/')]); + let results = await Promise.all([ngx.fetch('https://nginx.org/'), + ngx.fetch('https://nginx.org/en/')]); r.return(200, JSON.stringify(results, undefined, 4)); }