Skip to content

Commit 61e7a62

Browse files
authored
fix: enable compression middleware for HTTP2 connections (#116)
1 parent c64fcb2 commit 61e7a62

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/server.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,9 +1668,8 @@ class Server<
16681668
}
16691669

16701670
// compress is placed last and uses unshift so that it will be the first middleware used
1671-
if (this.options.compress && !isHTTP2) {
1671+
if (this.options.compress) {
16721672
const compression = require('compression');
1673-
16741673
middlewares.push({ name: 'compression', middleware: compression() });
16751674
}
16761675

0 commit comments

Comments
 (0)