boxlang-express 0.1.13

Released .

  • Added Range request support (RFC 7233) to res.sendFile()/download() and static file serving — a request naming a byte range now gets a 206 Partial Content response with just that slice instead of the whole file, enabling video/audio scrubbing and resumable downloads. Every file response now sets Accept-Ranges: bytes. Multi-range requests and If-Range aren't supported — see RangeParser.bx.
  • Added app.locals/res.locals — two plain structs merged into every res.render() call's data (app.locals < res.locals < the explicit data argument, 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, and req.hostname — same trust proxy trust model as req.ip (X-Forwarded-Proto/X-Forwarded-Host are only honored when app.set("trust proxy", true)), since BoxExpress's own HttpServer never 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.