1
0
Fork 0
forked from svrjs/svrjs

Fix "enableCompression not found" error

This commit is contained in:
Dorian Niemiec 2024-04-07 15:52:07 +02:00
parent 9576dc6406
commit 98ed9d9242

2
svr.js
View file

@ -3715,7 +3715,7 @@ if (!cluster.isPrimary) {
var hdhds = getCustomHeaders();
var brNotImplementedBun = false;
// Bun 1.1 has definition for zlib.createBrotliCompress, but throws an error while invoking the function.
if (process.isBun && enableCompression) {
if (process.isBun && configJSON.enableCompression) {
try {
zlib.createBrotliCompress();
} catch (err) {