Skip to content

APIGatewayV2 construct doesn't actually clear the CORS config when cors: false is set - #6967

Open
newmaniese wants to merge 2 commits into
anomalyco:devfrom
newmaniese:fix/apigatewayv2-cors-false
Open

APIGatewayV2 construct doesn't actually clear the CORS config when cors: false is set#6967
newmaniese wants to merge 2 commits into
anomalyco:devfrom
newmaniese:fix/apigatewayv2-cors-false

Conversation

@newmaniese

Copy link
Copy Markdown

AWS treats {} as a bare CORS config; omit corsConfiguration so CORS is fully disabled.

newmaniese and others added 2 commits August 12, 2026 14:47
AWS treats {} as a bare CORS config; omit corsConfiguration so CORS is fully disabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover default, disabled, and custom CORS via Pulumi mocks, and clarify
that disabling CORS omits the config rather than setting an empty object.

Co-authored-by: Cursor <cursoragent@cursor.com>

@omercnet omercnet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the fix against #6748 and the relevant Pulumi/AWS update paths. An Output resolving to undefined is omitted during Pulumi resource-property serialization, while removing the provider's cors_configuration block invokes DeleteCorsConfiguration, so this handles both new APIs and updates from the prior empty-block state. The focused CORS tests pass, including default, disabled, and custom configurations; platform typecheck and build also pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

APIGatewayV2 construct doesn't actually clear the CORS config when cors: false is set

2 participants