The 4.17.1 patch release includes one bug fix:
res.status()
API has been reverted due to causing regressions in existing Express 4 applications.For a complete list of changes in this release, see History.md.
The 4.17.0 minor release includes bug fixes and some new features, including:
express.raw()
and express.text()
middleware have been added to provide request body parsing for more raw request payloads. This uses the expressjs/body-parser module module underneath, so apps that are currently requiring the module separately can switch to the built-in parsers.res.cookie()
API now supports the "none"
value for the sameSite
option."trust proxy"
setting is enabled, the req.hostname
now supports multiple X-Forwarded-For
headers in a request.res.sendFile()
API now provides and more immediate and easier to understand error when a non-string is passed as the path
argument.res.status()
API now provides and more immediate and easier to understand error when null
or undefined
is passed as the argument.For a complete list of changes in this release, see History.md.
The 4.16.4 patch release includes various bug fixes:
"Request aborted"
may be logged in res.sendfile
.For a complete list of changes in this release, see History.md.
The 4.16.3 patch release includes various bug fixes:
%
at the end of the url in the res.location
method or the res.redirect
method would not get encoded as %25
.req.url
value can result in a thrown error within the default 404 handling.express.static
redirect responses to properly include </html>
.For a complete list of changes in this release, see History.md.
The 4.16.2 patch release includes a regression bug fix:
TypeError
that can occur in the res.send
method when a Buffer
is passed to res.send
and the ETag
header is already set on the response.For a complete list of changes in this release, see History.md.
The 4.16.1 patch release includes a regression bug fix:
express.static
.For a complete list of changes in this release, see History.md.
The 4.16.0 minor release includes security updates, bug fixes, performance enhancements, and some new features, including:
req.host
, req.hostname
, req.ip
, req.ips
, req.protocol
.mime
dependency. This may affect your application if untrusted string input is passed to the following APIs: res.type()
.express.static
, res.sendfile
, and res.sendFile
."json escape"
can be enabled to escape characters in res.json()
, res.jsonp()
and res.send()
responses that can trigger clients to sniff the response as HTML instead of honoring the Content-Type
. This can help protect an Express app from a class of persistent XSS-based attacks.res.download()
method now accepts an optional options
object.express.json()
and express.urlencoded()
middleware have been added to provide request body parsing support out-of-the-box. This uses the expressjs/body-parser module module underneath, so apps that are currently requiring the module separately can switch to the built-in parsers.express.static()
middleware and res.sendFile()
method now support setting the immutable
directive on the Cache-Control
header. Setting this header with an appropriate maxAge
will prevent supporting web browsers from sending any request to the server when the file is still in their cache.Content-Type
of more files. There are 70 new types for file extensions.For a complete list of changes in this release, see History.md.
The 4.15.5 patch release includes security updates, some minor performance enhancements, and a bug fix:
express.static
, req.fresh
, res.json
, res.jsonp
, res.send
, res.sendfile
res.sendFile
, res.sendStatus
.If-None-Match
) faster.For a complete list of changes in this release, see History.md.
The 4.15.4 patch release includes some minor bug fixes:
"trust proxy"
value being manipulated in certain conditions.For a complete list of changes in this release, see History.md.
The 4.15.3 patch release includes a security update and some minor bug fixes:
maxAge
option in the following APIs: express.static
, res.sendfile
, and res.sendFile
.res.set
cannot add charset to Content-Type
.</html>
in HTML document.For a complete list of changes in this release, see History.md.
The 4.15.2 patch release includes a minor bug fix:
[
in the extended (default) query parser.For a complete list of changes in this release, see History.md.
The 4.15.1 patch release includes a minor bug fix:
express.static()
middleware and res.sendFile()
method would incorrectly respond with 412 Precondition Failed.For a complete list of changes in this release, see History.md.
The 4.15.0 minor release includes bug fixes, performance improvements, and other minor feature additions, including:
express.static()
middleware and res.sendFile()
method now support the If-Match
and If-Unmodified-Since
request headers.For a complete list of changes in this release, see History.md.
The 4.14.1 patch release includes bug fixes and performance improvements, including:
Error
object which has a headers
property that is not an object.For a complete list of changes in this release, see History.md.
The 4.14.0 minor release includes bug fixes, security update, performance improvements, and other minor feature additions, including:
res.sendFile()
method now accepts two new options: acceptRanges
and cacheControl
.
acceptRanges
(defaut is true
), enables or disables accepting ranged requests. When disabled, the response does not send the Accept-Ranges
header and ignores the contents of the Range
request header.cacheControl
, (default is true
), enables or disables the Cache-Control
response header. Disabling it will ignore the maxAge
option.res.sendFile
has also been updated to handle Range
header and redirections better.res.location()
method and res.redirect()
method will now URL-encode the URL string, if it is not already encoded.res.json()
method and res.jsonp()
method have been improved in the common cases.res.cookie()
method supports the sameSite
option to let you specify the SameSite cookie attribute. NOTE: This attribute has not yet been fully standardized, may change in the future, and many clients may ignore it.
The possible value for the sameSite
option are:
true
, which sets the SameSite
attribute to Strict
for strict same site enforcement.false
, which does not set the SameSite
attribute.'lax'
, which sets the SameSite
attribute to Lax
for lax same site enforcement.'strict'
, which sets the SameSite
attribute to Strict
for strict same site enforcement.req.range()
method options object now supports a combine
option (false
by default), which when true
, combines overlapping and adjacent ranges and returns them as if they were specified that way in the header.For a complete list of changes in this release, see History.md.