|
|
|
@ -17,6 +17,7 @@ using Volo.Abp.AspNetCore.Authentication.JwtBearer;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
|
|
|
|
|
using Volo.Abp.AspNetCore.Serilog;
|
|
|
|
|
using Volo.Abp.Auditing;
|
|
|
|
|
using Volo.Abp.AuditLogging.EntityFrameworkCore;
|
|
|
|
@ -168,11 +169,18 @@ namespace MyCompanyName.MyProjectName
|
|
|
|
|
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
|
|
|
|
{
|
|
|
|
|
var app = context.GetApplicationBuilder();
|
|
|
|
|
var env = context.GetEnvironment();
|
|
|
|
|
|
|
|
|
|
if (!context.GetEnvironment().IsDevelopment())
|
|
|
|
|
if (env.IsDevelopment())
|
|
|
|
|
{
|
|
|
|
|
app.UseDeveloperExceptionPage();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
app.UseErrorPage();
|
|
|
|
|
app.UseHsts();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
app.UseCorrelationId();
|
|
|
|
|
app.UseVirtualFiles();
|
|
|
|
|