Module middleware/gzip
Middleware for on-the-fly GZip compression of response bodies.
By default only text content types are compressed. This can be controlled
using the gzip.contentTypes
property:
Example
app.configure("gzip");
app.gzip.contentTypes = /^text|xml|json|javascript/;
Functions
- middleware (next, app)
middleware (next, app)
JSGI middleware for GZIP compression.
Parameters
Function | next | the wrapped middleware chain |
Object | app | the Stick Application object |
Returns
Function | a JSGI middleware function |