Skip to content

Instantly share code, notes, and snippets.

View kavimaluskam's full-sized avatar

Alex Kam kavimaluskam

View GitHub Profile
const zlib = require('zlib');
const concatStream = require('concat-stream');
const BufferHelper = require('bufferhelper');
const { debugLogger } = require('../../utils/logger');
/**
* Modify the response
* @param res {Object} The http response
* @param contentEncoding {String} The http header content-encoding: gzip/deflate
* @param callback {Function} Custom modified logic