bedrock-express
Advanced tools
Changelog
6.4.1 - 2022-03-24
Changelog
6.4.0 - 2022-03-24
bedrock@4.5
bedrock-server@3.2
.esm.js
to
transpile to CommonJS.Changelog
6.3.0 - 2022-01-21
Changelog
6.2.2 - 2022-01-16
Changelog
6.2.1 - 2022-01-16
Add patch to ensure current CORS behavior continues for bedrock-express servers running on localhost. This is mostly for development purposes, but does apply to any bedrock-express server that actually does run in production on localhost. The new Private Network Access CORS security feature has been added to Chrome to stop cross-origin requests from being made to private networks (without specific permission via a new CORS header). The header is:
Access-Control-Allow-Private-Network: true
This change enables sending that header on every response -- if the
bedrock server's host is configured such that the string localhost
appears in its value. This alone will not enable CORS on an endpoint,
the Access-Control-Allow-Origin
header must also be set. This
header is only set if the cors
middleware has been used (or some
other means has been used) on a specific route. Therefore, this change
should not expose any routes that were not previously exposed via
CORS headers, rather, it should only enable any routes that were
previously exposed to continue to be hit just like before, provided
that they are running on localhost. If the server runs on some other
private network, the new version of Chrome will not allow them to be
accessed even if the other CORS headers have been set, because this
patch will not set the new header in that case. If this feature needs
to be disabled, set bedrock.config.express.allowLocalhostCors=false
.
Changelog
6.2.0 - 2022-01-11
next
from an asyncHandler
. In previous
versions process.nextTick(next)
was required to safely call a subsequent
middleware from a middleware created with asyncHandler
. It is still
safe to keep doing that, however, now it is also safe to just call next()
normally because this behavior is built into the asyncHandler
helper.Changelog
6.1.0 - 2021-10-26
fastifyOptions
to the Bedrock config.Changelog
6.0.0 - 2021-10-07
dumpExceptions
to false
. This prevents
unwanted stack traces from being included with HTML error responses.Changelog
5.0.1 - 2021-08-25
Changelog
5.0.0 - 2021-08-24
bedrock-express.fastify.init
event to allow modules to listen to when
fastify
has been initialized. No events are currently emitted for adding
routes/middleware/etc. to fastify
as no pattern for this has been yet
determined. For now, the events for adding routes via express should
continue to be used.bedrock-express.fastify.ready
event when the express app is ready and
has been added to fastify
.fastify
instance and Fastify
class via module API.config.express.session.ttl
, used by session storage libraries.http2
implementation to be
used and provides a pathway to upgrading to fastify and deprecating express.config.express.session.saveUninitialized
now defaults to
false. Unmodified sessions will no longer save to the database until data has
been added to the session.trustProxy
option is disabled by default. This
option is used when a Bedrock application is running with httpOnly = true
behind a load balancer that is doing TLS termination. The ability to enable
trustProxy
was added in the v6.1 release.