bragg-cors
v1.0.0
Published
CORS middleware for bragg
Downloads
378
Maintainers
Readme
bragg-cors
Install
$ npm install --save bragg-cors
Usage
const bragg = require('bragg');
const cors = require('bragg-cors');
const app = bragg();
app.use(ctx => {
ctx.body = {
unicorn: '🦄'
};
});
app.use(cors('https://www.foo.io'));
exports.handler = app.listen();
API
cors(origin)
origin
Type: string
A URI that may access the resource.
License
MIT © Sam Verschueren