
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@zhike/log-koa-middleware
Advanced tools
日志打印中间件

$ npm install @zhike/log-koa-middleware
const logger = require('@zhike/log-koa-middleware')
const Koa = require('koa')
const app = new Koa()
//只打印requestBody
app.use(logger())
// 打印所有路径的headers中的content-type。只打印以/player2开头的路径的responseBody
app.use(logger({
requestHeaders: ['content-type'],
responseHeaders: ['content-type'],
responseBodyWhiteList: ['/^\/player2/']
}))
| 参数名 | 类型 | 说明 |
|---|---|---|
| reqId | String | 响应标识id(使用自定义的reqId需放在日志中间件前。如果为空且ctx.reqId为空则使用uuidv4自动生成reqId) |
| requestHeaders | Array | 需要打印的request头部 (默认不打印) |
| responseHeaders | Array | 需要打印的response头部 (默认不打印) |
| responseBodyWhiteList | Array | 白名单,字符串数组,可为正则(对于正则匹配剔除部分路由,可在业务代码中的ctx.useResponseBodyOption=false跳过路由规则) |
| responseBodyBlackList | Array | 黑名单,字符串数组,可为正则(对于正则匹配剔除部分路由,可在业务代码中使用ctx.useResponseBodyOption=false跳过路由规则) |
注意:
FAQs
The npm package @zhike/log-koa-middleware receives a total of 16 weekly downloads. As such, @zhike/log-koa-middleware popularity was classified as not popular.
We found that @zhike/log-koa-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.