English / 日本語
Provides utilities to configure CORS for Amazon API Gateway (API Gateway) with AWS Cloud Development Kit (CDK).
This library would help you if you feel tiresome of repeating CORS settings for API Gateway with CDK.
When I describe a REST API with API Gateway, I often write a couple of utility functions to deal with CORS. These functions are quite simple though, I no longer want to prepare them everytime I start a new project.
Please add this repository to your Node dependencies.
npm install https://github.com/codemonger-io/cdk-cors-utils.git#v0.3.0
The installed module will be available as cdk2-cors-utils
like the following,
import { makeIntegrationResponsesAllowCors } from 'cdk2-cors-utils';
This library is designed for CDK v2.x, and does not work with CDK v1.x.
Please refer to api-docs/markdown/index.md
.
TBD
build
script transplies TypeScript files in the src
folder.
npm run build
You will find transpiled JavaScript (*.js
) and type declaration (*.d.ts
) files created in a folder dist
.
doc
script generates the API documentation.
npm run doc
You will find markdown files updated in the folder api-docs/markdown
.
Documentation is generated by API Extractor and API Documenter.