Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
server.request('*', (icapReq, icapRes, req, res, next) => {
icapRes.setIcapStatusCode(200);
icapRes.setIcapHeaders(icapReq.headers);
icapRes.setHttpMethod(req);
icapRes.setHttpHeaders(req.headers);
icapRes.writeHeaders(icapReq.hasBody());
const unzipper = zlib.createUnzip();
unzipper.pipe(icapRes);
icapReq.pipe(unzipper);
});