- Newest
- Most votes
- Most comments
If you handle CORS in your .NET code, you can deactivate the automatic CORS handling for the Lambda function. This option can be deactivated either using AWS Management Console or via AWS CLI. If you deploy your function using IaC (e.g. CloudFormation or SAM), do not set the corresponding configuration there, that means - do not specify the Cors
or FunctionUrlConfig
object.
Note that automatic CORS handling is deactivated by default.
You could also read this blog post which explains how to configure Lambda URLs.
Alternatively, you can leverage the Lambda function functionality to automatically handle CORS for you. Then, you should remove the CORS configuration from your .NET Web API initialization code (AddCors()
and UseCors()
methods).
Thank you!
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
Can you provide more details around what you were doing?