Add multiple allowed origin for ZEIT's Micro
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.eslintrc
.gitignore
.node-version
README.md
index.js
package.json
test.js
yarn.lock

README.md

micro-cors-multiple-allow-origin

CircleCI

CORS for ZEIT's Micro.

Add multiple allowed origin.

yarn add micro-cors-multiple-allow-origin

Usage

const corsMultipleAllowOrigin = require('micro-cors-multiple-allow-origin')
const cors = corsMultipleAllowOrigin({ origin: ['https://github.com', 'https://sugarshin.net'] })
const handler = (req, res) => send(res, 200, 'ok!')
module.exports = cors(handler)

Options

Other options refer to https://github.com/possibilities/micro-cors#options

License

MIT

© sugarshin