- 最新
- 投票最多
- 评论最多
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!
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
Can you provide more details around what you were doing?