Dmitry Volyntsev
[nginx-announce] njs-0.7.0
October 19, 2021 12:46PM

I'm glad to announce a new release of NGINX JavaScript module (njs).

This release adds a bunch of long-awaited features.

Notable new features:
- async/await support:
- HTTPS support in Fetch API:
: async function content(r) {
: let results = await Promise.all([ngx.fetch(''),
: ngx.fetch('')]);
: r.return(200, JSON.stringify(results, undefined, 4));
: }

- WebCrypto API support:
: async function host_hash(r) {
: let hash = await crypto.subtle.digest('SHA-512',;
: r.setReturnValue(Buffer.from(hash).toString('hex'));
: }

Learn more about njs:

- Overview and introduction:
- NGINX JavaScript in Your Web Server Configuration:
- Extending NGINX with Custom Code:
- Using node modules with njs:
- Writing njs code using TypeScript definition files:

We are hiring:

If you are a C programmer, passionate about Open Source and you
love what we do, consider the following career opportunity:

Feel free to try it and give us feedback on:

- Github:
- Mailing list:

Changes with njs 0.7.0 19 Oct 2021

nginx modules:

*) Feature: added HTTPS support for Fetch API.

*) Feature: added setReturnValue() method.


*) Feature: introduced Async/Await implementation.

*) Feature: added WebCrypto API implementation.

*) Bugfix: fixed copying of closures for declared
functions. The bug was introduced in 0.6.0.

*) Bugfix: fixed unhandled promise rejection in handle

*) Bugfix: fixed Response.headers getter in Fetch API.

nginx-announce mailing list
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 122
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 494 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready