105040 Update 增加缓存与压缩
This commit is contained in:
parent
0d0a314ef9
commit
9574d7e0b6
|
|
@ -26,6 +26,8 @@ public static class Program
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
// .WriteTo.Console()
|
// .WriteTo.Console()
|
||||||
);
|
);
|
||||||
|
builder.Services.AddResponseCompression();
|
||||||
|
builder.Services.AddResponseCaching();
|
||||||
|
|
||||||
Log.Logger.Information("LoadSubService");
|
Log.Logger.Information("LoadSubService");
|
||||||
builder.Services.LoadSubService();
|
builder.Services.LoadSubService();
|
||||||
|
|
@ -103,6 +105,10 @@ public static class Program
|
||||||
CodeFirst.InitTable();
|
CodeFirst.InitTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 启用缓存
|
||||||
|
app.UseResponseCaching();
|
||||||
|
// 启用压缩
|
||||||
|
app.UseResponseCompression();
|
||||||
// 启用静态文件支持
|
// 启用静态文件支持
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue