相关疑难解决方法(0)

如何在ASP.NET Core中启用CORS

我试图在我的ASP.NET Core Web API上启用跨源资源共享,但我被困住了.

EnableCors属性接受policyName类型string为参数:

// Summary:
//     Creates a new instance of the Microsoft.AspNetCore.Cors.Core.EnableCorsAttribute.
//
// Parameters:
//   policyName:
//     The name of the policy to be applied.
public EnableCorsAttribute(string policyName);
Run Code Online (Sandbox Code Playgroud)

policyName意味着什么以及如何在ASP.NET Core Web API上配置CORS

c# asp.net-core

154
推荐指数
10
解决办法
11万
查看次数

标签 统计

asp.net-core ×1

c# ×1