I'm working with 1.1.2 how does this make sense?? ...
# help
j
I'm working with 1.1.2 how does this make sense?? (these lines where added in the same PR #1594) The comment example, shows setting a cors object, while the type is boolean, so actually doing what the example suggests is possible is impossible. Setting cors=true doesn't seem to allowHeaders: ["*"] is it supposed to?
f
Hey @Justin Robinson, sorry about the confusion. A couple of things are wrong: • The TS doc example is wrong,
cors
only takes a
boolean
value for
ApiGatewayV1Api
• When
cors
is set to
true
, only allowed origins is set to
"*"
, we should set allowed headers and allowed methods also to allow wildcard.
Fixing it right now.
Fixed in 1.2.27
now if u set
cors: true
, it allows all headers