
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.
@gem-mine/cors
Advanced tools
npm i @gem-mine/cors -S
正常使用 koa 的中间件:
app.use(cors({
/**
* CORS 跨域请求支持,配置可以是:
* boolean: true 表示支持任意域的请求;
* array: 支持多域白名单配置,其中元素可以是 域名字符串、正则表达式。
*/
origins: boolean | ((string | RegExp)[]);
/**
* HTTP 请求方法,默认支持 GET/HEAD/PUT/POST/DELETE/PATCH
*/
methods?: ('get'|'head'|'put'|'post'|'delete'|'patch')[];
/**
* 是否允许发送Cookie,默认 true,发送
*/
credentials?: boolean;
/**
* 设置缓存,单位秒,缓存生效期内不会再次发送 OPTIONS 请求,默认 3600 秒
*/
maxAge?: number;
}))
针对 origins 的取值:
true
: 对所有域生效['http://baidu.com', /google\.com$/]
: 支持字符串或正则表达式FAQs
cors for koa, support multiple domains setting
We found that @gem-mine/cors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
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.