Release of nginx 1.19.3 and njs 0.4.4

Formed master branch release nginx 1.19.3, within which the development of new features continues (in a parallel supported stable branch 1.18 only changes related to the elimination of serious errors and vulnerabilities are made).

All changes:

  • Module included ngx_stream_set_module, which allows you to assign a value to a variable

    server {
    listen 12345;
    set $true 1;
    }

  • Directive added proxy_cookie_flags to specify cookie flags on proxied connections. For example, to add the "httponly" flag to Cookie "one" and the "nosecure" and "samesite=strict" flags to all other Cookies, you can use the construction:

    proxy_cookie_flags one httponly;
    proxy_cookie_flags ~ nosecure samesite=strict;

  • Similar Directive userid_flags for adding flags to Cookies is also implemented for the ngx_http_userid module.

Simultaneously took place issue njs 0.4.4, a JavaScript interpreter for the nginx web server. The njs interpreter implements the ECMAScript standards and allows you to extend nginx's ability to process requests using scripts in the configuration. Scripts can be used in a configuration file to define advanced request processing logic, generate a configuration, dynamically generate a response, modify a request/response, or quickly create problem-solving stubs in web applications. In the new version:

  • Added support for visual separation of digits in numbers (for example, "1_000").
  • Implemented missing methods for %TypedArray%.prototype: every(), filter(), find(), findIndex(), forEach(), includes(), indexOf(), lastIndexOf(), map(), reduce(), reduceRight(), reverse(), some().
  • Implemented missing methods for %TypedArray%: from(), of().
  • The DataView object has been implemented.

    : >> (new DataView(buf.buffer)).getUint16()
    : 32974

  • Buffer object implemented.

    : >> var buf = Buffer.from([0x80,206,177,206,178])
    : undefined
    : >> buf.slice(1).toString()
    : 'Ξ±Ξ²'
    : >> buf.toString('base64')
    : 'gM6xzrI='

  • Support for the Buffer object has been added to the "crypto" and "fs" methods, as well as returning a Buffer object instance in fs.readFile(), Hash.prototype.digest() and Hmac.prototype.digest().
  • Support for ArrayBuffer has been added to the TextDecoder.prototype.decode() method.

Source: opennet.ru

Add a comment