boxlang-express 0.1.13
Released .
- Added
Rangerequest support (RFC 7233) tores.sendFile()/download()and static file serving — a request naming a byte range now gets a206 Partial Contentresponse with just that slice instead of the whole file, enabling video/audio scrubbing and resumable downloads. Every file response now setsAccept-Ranges: bytes. Multi-range requests andIf-Rangearen't supported — see RangeParser.bx. - Added
app.locals/res.locals— two plain structs merged into everyres.render()call's data (app.locals<res.locals< the explicitdataargument, each overriding the last), so values a route doesn't set explicitly don't have to be threaded through every render() call by hand. - Added
req.protocol,req.secure, andreq.hostname— sametrust proxytrust model asreq.ip(X-Forwarded-Proto/X-Forwarded-Hostare only honored whenapp.set("trust proxy", true)), since BoxExpress's ownHttpServernever terminates TLS itself. - Added optional trailing route params (
/users/:id?) — same restriction as the*wildcard, only supported as the final path segment, since matching one anywhere else would need real backtracking. See Router.bx.