-
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
API Gateway CORS preflight causes synth error #5232
Labels
Comments
lukehedger
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 27, 2019
Seems like the CORS OPTIONS conflicts with another construct named "OPTIONS" |
nija-at
added
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 28, 2019
eladb
pushed a commit
that referenced
this issue
Dec 16, 2019
…stApi (#5249) If a proxy resource is added to the root, it will reflect any `addMethod` calls to the root resource, which causes two OPTIONS methods to be created when CORS is specified (one directly against the root resource and one by the proxy). This uncovered a more general bug where if the proxy resource was added to the root, and the root already included a method of a certain kind, we will get a duplicate. The fix is to avoid the proxy `addMethod` reflection on the root in case there is already a method by that type on the root. This, indirectly, also fixes #5232, where CORS cannot be used with `LambdaRestApi`, which is basically a root proxy.
Hi! Sorry to reawaken such an old issue, but I am facing the exact same problem on |
I'm also getting the same error on |
Any resolutions to this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Running
cdk synth
on a stack that uses the API Gateway Construct (LambdaRestApi
) with CORS preflight enabled throws an error.Reproduction Steps
Error Log
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: