From xeioex at nginx.com Tue Feb 7 23:59:56 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Tue, 7 Feb 2023 15:59:56 -0800
Subject: [nginx-announce] njs-0.7.10
Message-ID: <990f544a-9f32-da0b-d160-c4b9212d5423@nginx.com>
Hello,
I'm glad to announce a new feature heavy release of NGINX JavaScript
module (njs).
Notable new features:
- Fetch API extended support, including Headers() and Request()
constructors:
: async function makeRequest(uri, headers) {
: let h = new Headers(headers);
: h.delete("bar");
: h.append("foo", "xxx");
: let r = new Request(uri, {headers: h});
: return await ngx.fetch(r);
: }
- Extended WebCrypto API, most notably JWK support was added:
: async function importSigningJWK(jwk) {
: return await crypto.subtle.importKey('jwk', jwk,
: {name: "RSASSA-PKCS1-v1_5"},
: true, ['sign']);
: }
- XML parsing module:
: const xml = require("xml");
: let data = `ToveJani`;
: let doc = xml.parse(data);
:
: console.log(doc.note.to.$text) /* 'Tove' */
: console.log(doc.note.to.$attr$b) /* 'bar' */
: console.log(doc.note.$tags[1].$text) /* 'Jani' */
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.7.10 7 Feb 2023
nginx modules:
*) Feature: added Request, Response and Headers ctors in Fetch API.
*) Bugfix: fixed nginx logger callback for calls in master process.
Core:
*) Feature: added signal support in CLI.
*) Feature: added "xml" module for working with XML documents.
*) Feature: extended support for symmetric and asymmetric keys
in WebCrypto. Most notably JWK format for importKey() was added.
generateKey() and exportKey() were also implemented.
*) Feature: added String.prototype.replaceAll().
*) Bugfix: fixed for(expr1; conditional syntax error handling.
*) Bugfix: fixed Object.values() and Object.entries() with external
objects.
*) Bugfix: fixed RegExp.prototype[@@replace]().
From xeioex at nginx.com Thu Mar 9 23:43:54 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Thu, 9 Mar 2023 15:43:54 -0800
Subject: [nginx-announce] njs-0.7.11
Message-ID:
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
Notable new features:
- XMLNode API to modify XML documents:
: const xml = require("xml");
: let data = `ToveJani`;
: let doc = xml.parse(data);
:
: doc.$root.to.$attr$b = 'bar2';
: doc.$root.to.setAttribute('c', 'baz');
: delete doc.$root.to.$attr$a;
:
: console.log(xml.serializeToString(doc.$root.to))
: /* 'Tove' */
:
: doc.$root.to.removeAllAttributes();
: doc.$root.from.$text = 'Jani2';
:
: console.log(xml.serializeToString(doc))
: /* 'ToveJani2' */
:
: doc.$root.to.$tags = [xml.parse(``), xml.parse(``)];
: doc.$root.to.addChild(xml.parse(``));
:
: console.log(xml.serializeToString(doc.$root.to))
: /* '' */
:
: doc.$root.to.removeChildren('a');
:
: console.log(xml.serializeToString(doc.$root.to))
: /* '' */
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.7.11 9 Mar 2023
nginx modules:
*) Bugfix: added missed linking with libxml2 for the dynamic module.
The bug was introduced in 0.7.10.
Core:
*) Feature: added XMLNode API to modify XML documents.
*) Change: removed XML_PARSE_DTDVALID during parsing of XML document
due to security implications. The issue was introduced
in 0.7.10. When XML_PARSE_DTDVALID is enabled, libxml2 parses and
executes external entities present inside an XML document.
*) Bugfix: fixed the detection of await in arguments.
*) Bugfix: fixed Error() instance dumping when "name" prop is not
primitive.
*) Bugfix: fixed array instance with a getter property dumping.
*) Bugfix: fixed njs_object_property() with NJS_WHITEOUT properties.
*) Bugfix: fixed func instance dumping with "name" as getter.
*) Bugfix: fixed attaching of a stack to an error object.
*) Bugfix: fixed String.prototype.replace() with replacement
containing "$'", "$`".
From mdounin at mdounin.ru Tue Mar 28 16:44:02 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 28 Mar 2023 19:44:02 +0300
Subject: [nginx-announce] nginx-1.23.4
Message-ID:
Changes with nginx 1.23.4 28 Mar 2023
*) Change: now TLSv1.3 protocol is enabled by default.
*) Change: now nginx issues a warning if protocol parameters of a
listening socket are redefined.
*) Change: now nginx closes connections with lingering if pipelining was
used by the client.
*) Feature: byte ranges support in the ngx_http_gzip_static_module.
*) Bugfix: port ranges in the "listen" directive did not work; the bug
had appeared in 1.23.3.
Thanks to Valentin Bartenev.
*) Bugfix: incorrect location might be chosen to process a request if a
prefix location longer than 255 characters was used in the
configuration.
*) Bugfix: non-ASCII characters in file names on Windows were not
supported by the ngx_http_autoindex_module, the ngx_http_dav_module,
and the "include" directive.
*) Change: the logging level of the "data length too long", "length too
short", "bad legacy version", "no shared signature algorithms", "bad
digest length", "missing sigalgs extension", "encrypted length too
long", "bad length", "bad key update", "mixed handshake and non
handshake data", "ccs received early", "data between ccs and
finished", "packet length too long", "too many warn alerts", "record
too small", and "got a fin before a ccs" SSL errors has been lowered
from "crit" to "info".
*) Bugfix: a socket leak might occur when using HTTP/2 and the
"error_page" directive to redirect errors with code 400.
*) Bugfix: messages about logging to syslog errors did not contain
information that the errors happened while logging to syslog.
Thanks to Safar Safarly.
*) Workaround: "gzip filter failed to use preallocated memory" alerts
appeared in logs when using zlib-ng.
*) Bugfix: in the mail proxy server.
--
Maxim Dounin
http://nginx.org/
From xeioex at nginx.com Mon Apr 10 22:38:21 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Mon, 10 Apr 2023 15:38:21 -0700
Subject: [nginx-announce] njs-0.7.12
Message-ID:
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
Notable new features:
- "zlib" module:
: const zlib = require('zlib');
: zlib.deflateRawSync('αβγ').toString('base64')
: /* "O7fx3KZzmwE=" */
:
: zlib.inflateRawSync(Buffer.from('O7fx3KZzmwE=', 'base64')).toString()
: /* "αβγ" */
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.7.12 10 Apr 2023
nginx modules:
*) Bugfix: fixed Headers() constructor in Fetch API.
Core:
*) Feature: added Hash.copy() method in "crypto" module.
*) Feature: added "zlib" module.
*) Improvement: added support for export {name as default}
statement.
*) Bugfix: fixed Number constructor according to the spec.
From mdounin at mdounin.ru Tue Apr 11 16:17:38 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 11 Apr 2023 19:17:38 +0300
Subject: [nginx-announce] nginx-1.24.0
Message-ID:
Changes with nginx 1.24.0 11 Apr 2023
*) 1.24.x stable branch.
--
Maxim Dounin
http://nginx.org/
From mdounin at mdounin.ru Tue May 23 16:32:46 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 23 May 2023 19:32:46 +0300
Subject: [nginx-announce] nginx-1.25.0
Message-ID:
Changes with nginx 1.25.0 23 May 2023
*) Feature: experimental HTTP/3 support.
--
Maxim Dounin
http://nginx.org/
From mdounin at mdounin.ru Tue Jun 13 16:42:41 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 13 Jun 2023 19:42:41 +0300
Subject: [nginx-announce] nginx-1.25.1
Message-ID:
Changes with nginx 1.25.1 13 Jun 2023
*) Feature: the "http2" directive, which enables HTTP/2 on a per-server
basis; the "http2" parameter of the "listen" directive is now
deprecated.
*) Change: HTTP/2 server push support has been removed.
*) Change: the deprecated "ssl" directive is not supported anymore.
*) Bugfix: in HTTP/3 when using OpenSSL.
--
Maxim Dounin
http://nginx.org/
From xeioex at nginx.com Thu Jul 6 22:23:22 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Thu, 6 Jul 2023 15:23:22 -0700
Subject: [nginx-announce] njs-0.8.0
Message-ID: <9c724659-4a8e-7298-bc66-885093b09790@nginx.com>
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
Notable new features:
- shared dictionaries:
Shared dictionary keeps the key-value pairs shared between worker
processes. This allows to cache data in memory and share it between
workers.
: example.conf:
: # Creates a 1Mb dictionary with string values,
: # removes key-value pairs after 60 seconds of inactivity:
: js_shared_dict_zone zone=foo:1M timeout=60s;
:
: # Creates a 512Kb dictionary with string values,
: # forcibly removes oldest key-value pairs when the zone is overflowed:
: js_shared_dict_zone zone=bar:512K timeout=30s evict;
:
: # Creates a 32Kb permanent dictionary with numeric values:
: js_shared_dict_zone zone=num:32k type=number;
:
: example.js:
: function get(r) {
: r.return(200, ngx.shared.foo.get(r.args.key));
: }
:
: function set(r) {
: r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));
: }
:
: function delete(r) {
: r.return(200, ngx.shared.bar.delete(r.args.key));
: }
:
: function increment(r) {
: r.return(200, ngx.shared.num.incr(r.args.key, 2));
: }
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.8.0 6 Jul 2023
nginx modules:
*) Change: removed special treatment of forbidden headers in Fetch API
introduced in 0.7.10.
*) Change: removed deprecated since 0.5.0 r.requestBody and
r.responseBody in HTTP module.
*) Change: throwing an exception in r.internalRedirect() while
filtering in HTTP module.
*) Feature: introduced global nginx properties.
ngx.build - an optional nginx build name, corresponds to
--build=name argument of configure script, by default is "".
ngx.conf_file_path - the file path to current nginx configuration
file.
ngx.error_log_path - the file path to current error log file.
ngx.prefix - the directory that keeps server files.
ngx.version - the nginx version as a string, for example: "1.25.0".
ngx.version_number - the nginx version as a number, for example:
1025000.
ngx.worker_id - corresponds to an nginx internal worker id.
The value is between 0 and worker_processes - 1.
*) Feature: introduced js_shared_dict_zone directive.
The directive allows to declare a dictionary that is shared
among the
working processes.
*) Improvement: added compile-time options to disable njs modules.
For example to disable libxslt related code:
NJS_LIBXSLT=NO ./configure .. --add-module=/path/to/njs/module
*) Bugfix: fixed r.status setter when filtering in HTTP module.
*) Bugfix: fixed setting of Location header in HTTP module.
Core:
*) Change: native methods are provided with retval argument.
This change breaks compatibility with C extension for njs
requiring to modify the code.
*) Change: non-compliant deprecated String methods were removed.
The following methods were removed: String.bytesFrom(),
String.prototype.fromBytes(), String.prototype.fromUTF8(),
String.prototype.toBytes(), String.prototype.toUTF8(),
String.prototype.toString(encoding).
*) Change: removed support for building with GNU readline.
*) Feature: added Array.from(), Array.prototype.toSorted(),
Array.prototype.toSpliced(), Array.prototype.toReversed().
*) Feature: added %TypedArray%.prototype.toSorted(),
%TypedArray%.prototype.toSpliced(),
%TypedArray%.prototype.toReversed().
*) Feature: added CryptoKey properties in WebCrypto.
The following properties for CryptoKey were added:
algorithm, extractable, type, usages.
*) Bugfix: fixed retval of crypto.getRandomValues().
*) Bugfix: fixed evaluation of computed property names with function
expressions.
*) Bugfix: fixed implicit name for a function expression declared in
arrays.
*) Bugfix: fixed parsing of for-in loops.
*) Bugfix: fixed Date.parse() with ISO-8601 format and UTC time
offset.
From mdounin at mdounin.ru Tue Aug 15 18:37:23 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 15 Aug 2023 21:37:23 +0300
Subject: [nginx-announce] nginx-1.25.2
Message-ID:
Changes with nginx 1.25.2 15 Aug 2023
*) Feature: path MTU discovery when using HTTP/3.
*) Feature: TLS_AES_128_CCM_SHA256 cipher suite support when using
HTTP/3.
*) Change: now nginx uses appname "nginx" when loading OpenSSL
configuration.
*) Change: now nginx does not try to load OpenSSL configuration if the
--with-openssl option was used to built OpenSSL and the OPENSSL_CONF
environment variable is not set.
*) Bugfix: in the $body_bytes_sent variable when using HTTP/3.
*) Bugfix: in HTTP/3.
--
Maxim Dounin
http://nginx.org/
From xeioex at nginx.com Tue Sep 12 23:08:59 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Tue, 12 Sep 2023 16:08:59 -0700
Subject: [nginx-announce] njs-0.8.1
Message-ID: <99d1b046-b1bf-b951-06bd-8ebab7241d55@nginx.com>
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
Notable new features:
- Periodic code execution:
js_periodic direcrive specifies a content handler to run at regular
interval.
The handler receives a session object as its first argument, it also has
access
to global objects such as ngx.
: example.conf:
: location @periodics {
: # to be run at 1 minute intervals in worker process 0
: js_periodic main.handler interval=60s;
:
: # to be run at 1 minute intervals in all worker processes
: js_periodic main.handler interval=60s worker_affinity=all;
:
: # to be run at 1 minute intervals in worker processes 1 and 3
: js_periodic main.handler interval=60s worker_affinity=0101;
:
: resolver 10.0.0.1;
: js_fetch_trusted_certificate /path/to/ISRG_Root_X1.pem;
: }
:
: example.js:
: async function handler(s) {
: let reply = async ngx.fetch('https://nginx.org/en/docs/njs/');
: let body = async reply.text();
:
: ngx.log(ngx.INFO, body);
: }
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.8.1 12 Sep 2023
nginx modules:
*) Feature: introduced js_periodic directive.
The directive specifies a JS handler to run at regular intervals.
*) Feature: implemented items() method for a shared dictionary.
The method returns all the non-expired key-value pairs.
*) Bugfix: fixed size() and keys() methods of a shared dictionary.
*) Bugfix: fixed erroneous exception in r.internalRedirect()
introduced in 0.8.0.
Core:
*) Bugfix: fixed incorrect order of keys in
Object.getOwnPropertyNames().
From mdounin at mdounin.ru Tue Oct 24 15:52:09 2023
From: mdounin at mdounin.ru (Maxim Dounin)
Date: Tue, 24 Oct 2023 18:52:09 +0300
Subject: [nginx-announce] nginx-1.25.3
Message-ID:
Changes with nginx 1.25.3 24 Oct 2023
*) Change: improved detection of misbehaving clients when using HTTP/2.
*) Feature: startup speedup when using a large number of locations.
Thanks to Yusuke Nojima.
*) Bugfix: a segmentation fault might occur in a worker process when
using HTTP/2 without SSL; the bug had appeared in 1.25.1.
*) Bugfix: the "Status" backend response header line with an empty
reason phrase was handled incorrectly.
*) Bugfix: memory leak during reconfiguration when using the PCRE2
library.
Thanks to ZhenZhong Wu.
*) Bugfixes and improvements in HTTP/3.
--
Maxim Dounin
http://nginx.org/
From xeioex at nginx.com Tue Oct 24 19:59:10 2023
From: xeioex at nginx.com (Dmitry Volyntsev)
Date: Tue, 24 Oct 2023 12:59:10 -0700
Subject: [nginx-announce] njs-0.8.2
Message-ID:
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
Notable new features:
- console object in nginx modules:
Console object is a global object that provides access to the environment's
console. It can be used to log information to the console, using
console.log(), console.info(), console.warn(), console.error() methods.
This feature unifies logging in nginx modules and njs CLI.
Learn more about njs:
- Overview and introduction:
https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
https://youtu.be/Jc_L6UffFOs
- Extending NGINX with Custom Code:
https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
https://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
https://nginx.org/en/docs/njs/typescript.html
Feel free to try it and give us feedback on:
- Github:
https://github.com/nginx/njs/issues
- Mailing list:
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Additional examples and howtos can be found here:
- Github:
https://github.com/nginx/njs-examples
Changes with njs 0.8.2 24 Oct 2023
nginx modules:
*) Feature: introduced console object. The following methods
were introduced: error(), info(), log(), time(), timeEnd(),
warn().
*) Bugfix: fixed HEAD response handling with large Content-Length
in fetch API.
*) Bugfix: fixed items() method for a shared dictionary.
*) Bugfix: fixed delete() method for a shared dictionary.
Core:
*) Feature: extended "fs" module. Added existsSync().
*) Bugfix: fixed "xml" module. Fixed broken XML exception handling
in parse() method.
*) Bugfix: fixed RegExp.prototype.exec() with global regexp and
unicode input.
*) Bugfix: fixed return statement parsing with invalid expression.