增加功能:Client网站增加网站压缩功能默认采用gzip
This commit is contained in:
parent
08c2e808ba
commit
ee6c2447d7
|
@ -47,6 +47,7 @@ namespace Bootstrap.Client
|
||||||
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
|
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
|
||||||
if (Configuration["DisableAutomaticKeyGeneration"] == "True") dataProtectionBuilder.DisableAutomaticKeyGeneration();
|
if (Configuration["DisableAutomaticKeyGeneration"] == "True") dataProtectionBuilder.DisableAutomaticKeyGeneration();
|
||||||
services.AddSignalR().AddJsonProtocalDefault();
|
services.AddSignalR().AddJsonProtocalDefault();
|
||||||
|
services.AddResponseCompression();
|
||||||
services.AddMvc(options =>
|
services.AddMvc(options =>
|
||||||
{
|
{
|
||||||
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
||||||
|
@ -80,6 +81,7 @@ namespace Bootstrap.Client
|
||||||
app.UseStatusCodePagesWithReExecute("/Home/Error/{0}");
|
app.UseStatusCodePagesWithReExecute("/Home/Error/{0}");
|
||||||
app.UseCors(builder => builder.WithOrigins(Configuration["AllowOrigins"].Split(',', StringSplitOptions.RemoveEmptyEntries)).AllowAnyHeader().AllowAnyMethod().AllowCredentials());
|
app.UseCors(builder => builder.WithOrigins(Configuration["AllowOrigins"].Split(',', StringSplitOptions.RemoveEmptyEntries)).AllowAnyHeader().AllowAnyMethod().AllowCredentials());
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
app.UseResponseCompression();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.UseCookiePolicy();
|
app.UseCookiePolicy();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|
Loading…
Reference in New Issue