0.1.2 • Published 4 years ago

@tigojs/lambda-cors v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@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;
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago