APIGatewayV2 construct doesn't actually clear the CORS config when cors: false is set - #6967
Open
newmaniese wants to merge 2 commits into
Open
APIGatewayV2 construct doesn't actually clear the CORS config when cors: false is set#6967newmaniese wants to merge 2 commits into
newmaniese wants to merge 2 commits into
Conversation
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
approved these changes
Aug 28, 2026
omercnet
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AWS treats {} as a bare CORS config; omit corsConfiguration so CORS is fully disabled.
cors: falseis set #6748undefinedinstead of nested.apply())