@amio/micro-cors
Advanced tools
Comparing version 0.0.6 to 0.1.0
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8863
64
0