2.0.0 • Published 5 years ago

arc-macro-cors v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

arc-macro-cors

Enable CORS for Architect HTTP APIs (APIG HTTP Api only).

###Install:

npm i arc-macro-cors

And add to your .arc-file for default CORS settings:

@app
myapp

@cors
@http
get /
get /foo
post /foo

@macros
arc-macro-cors

Or configure specific CORS settings:

@app
myapp

@cors
allowOrigins https://example.com
allowMethods GET,POST,OPTIONS
allowHeaders Authorization,X-Custom-Header
exposeHeaders Content-Length,X-Custom-Header
maxAge 7200
allowCredentials true

@http
get /
get /foo
post /foo

@macros
arc-macro-cors

See AWS::Serverless::HttpApi/HttpApiCorsConfiguration for more information.

2.0.0

5 years ago

1.0.0

5 years ago