Skip to content

thedersen/arc-macro-cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published