之前的版本,跨域的设置在Startup的ConfigureServices:
services.AddCors(option => option.AddPolicy("Cors",
builder => builder.WithOrigins(GetCorsOrigins()).AllowAnyHeader()
.AllowAnyMethod()));
services.Configure<MvcOptions>(option => option.Filters.Add(new CorsAuthorizationFilterFactory("Cors")));
升级到3.0之后,如何配置跨域?
相关问题
- firebase storage cors strange Behaviour
- How do I add CORS to a compojure-api app?
- CORS issue with Twitter api calls in Webpack dev s
- CORS errors when trying to fetch from new Google C
- Access to XMLHttpRequest at '…' from origi
相关文章
- tp5.1.前后端分离.cros跨域问题.在线上找了各种方法.没辙了
- netcore3.1 WebApi独立运行跨域设置无效
- Security concerns about CORS
- Configure Spring for CORS
- subdomain CORS in webApi 2
- CORS request did not succeed on Firefox but works
- Run Angular and ASP.NET Web API on the same port
- CORS on Symfony 2 errors BeSimpleSOAPBundle callin
在 Startup.Configure 中添加下面的代码