-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(apigatewayv2): error while configuring ANY as an allowed method in CORS #13313
fix(apigatewayv2): error while configuring ANY as an allowed method in CORS #13313
Conversation
@nija-at Please review when you get a moment. Thanks! Edit: From OP
@nija-at I've decided to go with separate enum option because implementation looks much cleaner/clearer than monkey-patching it on the fly. Although, I do wish there was a proper enum extending feature in TypeScript. This solution would look even more elegant 😄. Let me know what you think. |
Hello - Sorry about the delay in reviewing PRs. We are experiencing an increased backlog of items that need our attention. |
No worries. Thanks for letting me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me.
I've fixed up the title and the 'BREAKING CHANGE' clause to more closely align with how we usually announce it.
Can you update the commit description (above the breaking changes clause and 'closes' statements)? This will go into the description of the 'git commit', so use the appropriate language.
Usually, the description should answer the two questions - 'Why is this change necessary?', 'How does this commit address the issue?'
@nija-at Done. Let me know if there is anything else I need to do. Thanks! |
db86b4c
to
8916f13
Compare
I've updated and force-pushed git commit title too. |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…n CORS (#13313) API gateway expects `*` to represent `ANY` HTTP method. `HttpMethod` enum doesn't have a value for that, thus causing errors when passing `HttpMethod` 's `ANY` option. This commit introduces `CorsHttpMethod` enum which has a proper `ANY` mapping to `*`. Closes #13280. Closes #13643. BREAKING CHANGE: The type of `allowMethods` property under `corsPreflight` section is changed from `HttpMethod` to `CorsHttpMethod`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…n CORS (#13313) API gateway expects `*` to represent `ANY` HTTP method. `HttpMethod` enum doesn't have a value for that, thus causing errors when passing `HttpMethod` 's `ANY` option. This commit introduces `CorsHttpMethod` enum which has a proper `ANY` mapping to `*`. Closes #13280. Closes #13643. BREAKING CHANGE: The type of `allowMethods` property under `corsPreflight` section is changed from `HttpMethod` to `CorsHttpMethod`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…n CORS (aws#13313) API gateway expects `*` to represent `ANY` HTTP method. `HttpMethod` enum doesn't have a value for that, thus causing errors when passing `HttpMethod` 's `ANY` option. This commit introduces `CorsHttpMethod` enum which has a proper `ANY` mapping to `*`. Closes aws#13280. Closes aws#13643. BREAKING CHANGE: The type of `allowMethods` property under `corsPreflight` section is changed from `HttpMethod` to `CorsHttpMethod`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
API gateway expects
*
to representANY
HTTP method.HttpMethod
enum doesn'thave a value for that, thus causing errors when passing
HttpMethod
'sANY
option.This commit introduces
CorsHttpMethod
enum which has a properANY
mapping to*
.Closes #13280.
Closes #13643.
BREAKING CHANGE: The type of
allowMethods
property undercorsPreflight
section is changed from
HttpMethod
toCorsHttpMethod
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license