Skip to content

Detect when compression middleware is installed? #72

Closed as not planned
Closed as not planned
@rexxars

Description

@rexxars

I am the author of a library called sse-channel, which implements server-sent events (SSE). For this to work in an efficient and fast manner, I need to be able to call flush on responses that pass through this compression middleware.

Currently I'm just checking for the presence of a flush method on the response and calling that, but since node has this method, it's causing me some issues. Is there a way I can detect whether the flush method is from this middleware, or if the compression middleware is applied to the response, somehow?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions