.net core 跨域配置 电脑版发表于:2021/4/13 15:14 //配置跨域 ``` services.AddCors(options => { options.AddPolicy("AllowAnyOrigin",policy =>policy.SetIsOriginAllowed((host) => true) .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials()); }); services.AddDbConte ```