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