API Gateway: LambdaRestApi defaultCorsPreflightOptions not attaching to children #28512
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
I'm instantiating a LambdaRestApi with the
defaultCorsPreflightOptions
property. However, the OPTIONS method that handles the CORS configuration for that property is not automatically being attached to all child resources like the property claims.Expected Behavior
I expected that defining the
defaultCorsPreflightOptions
would apply an OPTIONS method to all child resources of the API instance.Current Behavior
Only the root resource has an OPTIONS method attached to it.
Reproduction Steps
Dependencies:
LambdaRestApi instance:
Possible Solution
No response
Additional Information/Context
I am configuring the API resources/methods/lambda integrations in a nested stack. I can supply the code for that if needed, I'm unsure if it's relevant.
CDK CLI Version
2.101.0
Framework Version
No response
Node.js Version
v18
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: