
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
koa-simple-static
Advanced tools
Simple caching static file server for Koa
Similar to koa-static-cache, but with different options, better API, and in TypeScript.
Features:
/index.html
if availableaccept-encoding
includes gzipnpm i koa-simple-static
app.use(serve({
dir: process.cwd()
}))
dir: string
— directory you want to servemaxAge?: number = 0
— cache control max age (in seconds)extraHeaders?: Object[]
— any extra headers you wish to set for requests served by this module
[ { 'Link': '</foo.js>; rel=preload; as=script' }, { 'Set-Cookie': 'foo=bar; path=/;' } ]
import serve from 'koa-simple-static'
import { resolve } from 'path'
import Koa from 'koa'
const app = new Koa()
const port = process.env.PORT || 4444
app.use(serve({
dir: resolve(__dirname, 'public'),
extraHeaders: [ { 'X-Something-Whatever': 'foo, bar' } ]
}))
app.listen(port, () => {
console.log(`Serving on ${port}!`)
})
Important if you're using require
, you'll need to
require('koa-simple-static').default
.
index.html
). Now, you can have the good parts of both.engines
field, or else Babelify or otherwise compile your server.eslint
and tsc
.FAQs
Simple caching static file server for Koa
The npm package koa-simple-static receives a total of 91 weekly downloads. As such, koa-simple-static popularity was classified as not popular.
We found that koa-simple-static 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.