
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
koa2-url-cache
Advanced tools
Koa 2 middleware for cache response data.
npm install koa2-url-cache --save
Get start
const config = {
redis: {
host: '121.196.203.34',
port: 6379,
password: '',
db: 0,
},
urls: {
'/api/user/:name': {
ttl: 30, // seconds
}
}
}
app.use(cache(config));
Delete cache manual, qury url add parameter refresh=1
/api/user/list?refresh=1
prefix
is redis prefix key to storage cache data.only cache http code==200 error
Add all key-value to response headers.
addHeaders: {
"Access-Control-Allow-Origin": "http://localhost:8080",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Access-Control-Allow-Headers": "*"
}
key
is match by path-to-regexp
ttl
{integer} expire in ttl. seconds。no cache ,set ttl = null
addHeaders
{Object}. It will cover the top level addHeaders
'/api/user': {
ttl: '30', // seconds
addHeaders: { // custom headers
'x-power':'lx'
}
},
example:
FAQs
Koa2 middleware for cache response data
The npm package koa2-url-cache receives a total of 0 weekly downloads. As such, koa2-url-cache popularity was classified as not popular.
We found that koa2-url-cache 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.