Easy CORS handling for
micro
$ npm install micro-access
const {json, send} = require('micro');
const microAccess = require('micro-access');
module.exports = microAccess()(async (req, res) => {
const body = await json(req);
send(res, 200, body);
});
Type: Object
Same as control-access
.
Type: Function
The request handler to wrap.
- control-access - Easy CORS handling
MIT © Kevin Mårtensson