Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
micro-compress
Advanced tools
Compression for HTTP microservices built with Micro
Install micro-compress
using npm:
npm install --save micro-compress
Just wrap your Micro HTTP microservice with this module:
const {send, json} = require('micro');
const compress = require('micro-compress');
module.exports = compress(async (req, res) => {
const body = await json(req);
send(res, 200, body);
});
Options for the compression
module are passed as the first parameter:
const {Z_BEST_COMPRESSION} = require('zlib');
const {send, json} = require('micro');
const compress = require('micro-compress');
module.exports = compress({level: Z_BEST_COMPRESSION}, async (req, res) => {
const body = await json(req);
send(res, 200, body);
});
compress(opts, fn)
Name | Type | Description |
---|---|---|
opts | object | Optional. Options passed to compression |
fn | function | The request handler to wrap |
For available options see compression
's options.
MIT © Joakim Carlstein
FAQs
Compression for HTTP microservices built with Micro
The npm package micro-compress receives a total of 26,271 weekly downloads. As such, micro-compress popularity was classified as popular.
We found that micro-compress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.