micro-cors-multiple-allow-origin
v1.0.1
Published
Add multiple allowed origin for Zeit's Micro
Downloads
135
Readme
micro-cors-multiple-allow-origin
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
© sugarshin