expressjs / expressjs/express

Express and middleware that manipulate reponses

Open
#2,811 6 comments 0 reactions 0 assignees View on GitHub
discuss enhancement ideas
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

AFAIK, there is currently no generic / documented way to manipulate responses before they are passed on to the underlying socket (through a transform stream for example). I can think of 2 instances where this would be useful: compression and monitoring outgoing bandwidth.

The https://github.com/expressjs/compression/ module resorts to monkey patching the `res` object which is prone to error, difficult to maintain and not extensible.

It would be nice if there was a documented and extensible way to manipulate responses before they are passed to the underlying socket.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.