Variable scope in javascript module

Maxim Konovalov maxim at nginx.com
Tue Oct 30 22:30:52 UTC 2018


On 31/10/2018 01:27, Valentin V. Bartenev wrote:
> On Wednesday, 31 October 2018 00:55:20 MSK you wrote:
> [..]
> 
>> However, when i run it, the result is as below :
>> The suprising thing is the order it is logged : it seems : as we go for
>> async, perhaps both request are started at the same time so each one get a
>> starting of 403 (no yet updated). Could this be the pb ? What could be the
>> solution ? Run subrequest without giving the done function as callback and
>> directly test the return status ?
> [..]
> 
> Subrequests are async.  That allows you to do a lot of interesting stuff,
> like in this example where two subrequests are run in parallel:
> http://nginx.org/en/docs/njs/examples.html#fast_response
> 
Some additional stuff to this topic

https://github.com/nginxinc/nginx-openid-connect

-- 
Maxim Konovalov


More information about the nginx mailing list