-
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
(apigatewayv2): support '*' as a valid HTTP method #13280
Labels
@aws-cdk/aws-apigatewayv2
Related to Amazon API Gateway v2
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
p2
Comments
github-actions
bot
added
the
@aws-cdk/aws-apigatewayv2
Related to Amazon API Gateway v2
label
Feb 25, 2021
nija-at
added
feature-request
A feature should be added or improved.
p2
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
labels
Feb 25, 2021
mergify bot
pushed a commit
that referenced
this issue
Mar 22, 2021
…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*
|
nija-at
pushed a commit
that referenced
this issue
Mar 23, 2021
…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*
eladb
pushed a commit
that referenced
this issue
Mar 24, 2021
…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*
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Aug 26, 2021
…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*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-apigatewayv2
Related to Amazon API Gateway v2
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
p2
Hi @nija-at , I don't think this is just a limitation of API Gateway but rather a mismatch between what is expected by API Gateway and what is exposed by CDK.
API gateway accepts
*
to represent any HTTP method. The HttpMethod enum doesn't have a value for that.The following code synthesises and deploys correctly:
I would suggest to either create a separate enum for HTTP methods that aligns with what API gateway expects, or to internally map "ANY" to "*" during synthesis. It's wrong to claim that
allowMethods
accepts an array ofHttpMethod
when in fact not all possible values would be correct.Originally posted by @lorenzo2897 in #10230 (comment)
Lack of this method makes it difficult to configure CORS preflight. See #10230
The text was updated successfully, but these errors were encountered: