
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
restify-cors
Advanced tools
CORS middleware with full W3C spec support.
This project has been forked from https://github.com/TabDigital/restify-cors-middleware.
var restifyCors = require('restify-cors');
var cors = restifyCors({
preflightMaxAge: 5, // Optional
origins: ['http://api.myapp.com', 'http://web.myapp.com'], // defaults to ['*'] to allow all origins
allowHeaders: ['API-Token'],
exposeHeaders: ['API-Token-Expiry']
});
server.pre(cors.preflight);
server.use(cors.actual);
See unit tests for examples of preflight and actual requests.
FAQs
Common middlewares for all Node.js web services
We found that restify-cors 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.