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

AWS::Serverless::Api and AWS::Serverless::HttpApi have slightly different CORS origin property names #3647

Closed
mcavag opened this issue Sep 4, 2024 · 2 comments
Labels
contributors/good-first-issue Good first issue for a contributor type/feature

Comments

@mcavag
Copy link

mcavag commented Sep 4, 2024

The CorsConfiguration for AWS::Serverless::Api includes the following properties:

  AllowHeaders: String
  AllowMethods: String
  AllowOrigin: String <-- No S on the end of 'AllowOrigin'

The HttpApiCorsConfiguration for AWS::Serverless::HttpApi includes these properties:

 AllowHeaders: List
 AllowMethods: List
 AllowOrigins: List <-- But this one does have one

If you switch from a REST API to HTTP API and retain the same CORS configuration, you will get an error from this line of code:

Invalid value for 'Cors' property.

This is a difficult error to figure out. I ended up having to read the source code.

If the property name can't be changed, it would at least be helpful to include the name of the invalid property in the error message as a clue.

@mcavag mcavag added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Sep 4, 2024
@aaythapa aaythapa added type/feature contributors/good-first-issue Good first issue for a contributor and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Oct 2, 2024
@aaythapa
Copy link
Contributor

aaythapa commented Oct 4, 2024

Thanks for opening this issue! Closing it for now as it was addressed in the PR

@aaythapa aaythapa closed this as completed Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributors/good-first-issue Good first issue for a contributor type/feature
Projects
None yet
Development

No branches or pull requests

2 participants