@tigojs/lambda-cors
v0.1.2
Published
CORS helper for tigo lambda
Downloads
1
Readme
@tigojs/lambda-cors
Add cors support for tigo lambda.
This package is actually a wrapper of @koa/cors, see documentation of it to get more details of options.
Example
const cors = require('@tigojs/lambda-cors');
async function handleRequest(ctx) {
// if you use an async function or the return of function is a promise, you should add an await before the cors(ctx);
cors(ctx, corsOptions);
};
module.exports = handleRequest;