Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TA-1696): set cors allow credentials optionally #90

Merged

Conversation

mikerudd
Copy link
Contributor

@mikerudd mikerudd commented Oct 7, 2024

Description
talis-cdk-constructs hard codes the value of the CORS header access-control-allow-credentials to true. We have a requirement in the new extension to wildcard access-allow-origins however, when access-control-allow-credentials value is true, AWS API Gateway will not allow you to wildcard the origins. We therefore need to be able to set access-control-allow-credentials to false so that we can wildcard the origin.

@@ -99,6 +99,15 @@ describe("AuthenticatedApi", () => {
{
Name: "test-MyTestAuthenticatedApi",
ProtocolType: "HTTP",
CorsConfiguration: {
AllowCredentials: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment: confirms that by default AllowCredentials is set to true to ensure backwards compatibility.

@mikerudd mikerudd self-assigned this Oct 7, 2024
@mikerudd mikerudd marked this pull request as draft October 7, 2024 14:35
@mikerudd mikerudd marked this pull request as ready for review October 8, 2024 08:24
@mikerudd mikerudd added 90% and removed Do Not Merge labels Oct 8, 2024
Copy link
Contributor

@Crevitus Crevitus left a comment

Choose a reason for hiding this comment

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

LGTM

@mikerudd mikerudd merged commit 3d32a4a into main Oct 8, 2024
14 checks passed
@mikerudd mikerudd deleted the ta-1696_authenticated_api_cors_optionally_allow_credentials branch October 8, 2024 09:21
@talisaspire
Copy link
Collaborator

🎉 This PR is included in version 3.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

6 participants