W0: 网关API封装+数据模型+CORS启用
This commit is contained in:
@@ -27,7 +27,10 @@ builder.Services.AddHttpClient("VolPro", c =>
|
||||
MaxConnectionsPerServer = 10
|
||||
});
|
||||
|
||||
builder.Services.AddCors(o => o.AddDefaultPolicy(p => p.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()));
|
||||
|
||||
var app = builder.Build();
|
||||
app.UseCors();
|
||||
|
||||
// ── 读取配置 ──
|
||||
var gwCfg = app.Configuration.GetSection("Gateway");
|
||||
|
||||
Reference in New Issue
Block a user