While testing something with a lambda, I noticed I had twice the Access-Control-Allow-Origin header, and it led to CORS errors when calling my lambda function from the browser.
Upon investigation, I found that it was due to CORS being set both at the code level, and at the Lambda function URL configuration level. When it's configured in the Lambda URL, there's no need to setup CORSMiddleware.
This PR adds a comment about it in the todos-lambda sample project.
While testing something with a lambda, I noticed I had twice the
Access-Control-Allow-Origin
header, and it led to CORS errors when calling my lambda function from the browser.Upon investigation, I found that it was due to CORS being set both at the code level, and at the Lambda function URL configuration level. When it's configured in the Lambda URL, there's no need to setup
CORSMiddleware
.This PR adds a comment about it in the todos-lambda sample project.