Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amio/micro-cors

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amio/micro-cors - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

2

package.json
{
"name": "@amio/micro-cors",
"version": "0.0.6",
"version": "0.1.0",
"description": "Simple CORS middleware for Zeit's Micro",

@@ -5,0 +5,0 @@ "repository": "https://github.com/amio/micro-cors",

# micro-cors
Simple [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) middleware for Zeit's [Micro](https://github.com/zeit/micro)
[![][npm-badge]][npm-link]
[![Build Status](https://travis-ci.com/amio/micro-cors.svg?branch=master)](https://travis-ci.com/amio/micro-cors)
Simple [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) middleware for Zeit's [Micro](https://github.com/zeit/micro)
## Install

@@ -21,2 +21,3 @@

const cors = require('micro-cors')
const handler = (req, res) => micro.send(res, 200, 'ok!')

@@ -32,7 +33,7 @@

const cors = require('micro-cors')
const options = { allowMethods: 'PUT,POST' }
const handler = (req, res) => micro.send(res, 200, 'ok!')
const opts = { allowMethods: 'PUT,POST' }
module.exports = cors(opts)(handler)
module.exports = cors(options)(handler)
```

@@ -39,0 +40,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc