|
|
|
@ -39,11 +39,13 @@ namespace MyCompanyName.MyProjectName |
|
|
|
|
|
|
|
ConfigureConventionalControllers(); |
|
|
|
ConfigureAuthentication(context, configuration); |
|
|
|
ConfigureSwagger(context); |
|
|
|
ConfigureLocalization(); |
|
|
|
ConfigureVirtualFileSystem(context); |
|
|
|
ConfigureRedis(context, configuration, hostingEnvironment); |
|
|
|
ConfigureCors(context, configuration); |
|
|
|
|
|
|
|
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
|
|
|
|
//ConfigureSwaggerServices(context);
|
|
|
|
} |
|
|
|
|
|
|
|
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) |
|
|
|
@ -81,7 +83,7 @@ namespace MyCompanyName.MyProjectName |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private static void ConfigureSwagger(ServiceConfigurationContext context) |
|
|
|
private static void ConfigureSwaggerServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.AddSwaggerGen( |
|
|
|
options => |
|
|
|
@ -148,6 +150,7 @@ namespace MyCompanyName.MyProjectName |
|
|
|
{ |
|
|
|
var app = context.GetApplicationBuilder(); |
|
|
|
|
|
|
|
app.UseRouting(); |
|
|
|
app.UseCors(DefaultCorsPolicyName); |
|
|
|
|
|
|
|
app.UseVirtualFiles(); |
|
|
|
@ -157,11 +160,15 @@ namespace MyCompanyName.MyProjectName |
|
|
|
app.UseMultiTenancy(); |
|
|
|
} |
|
|
|
app.UseAbpRequestLocalization(); |
|
|
|
|
|
|
|
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet! |
|
|
|
app.UseSwagger(); |
|
|
|
app.UseSwaggerUI(options => |
|
|
|
{ |
|
|
|
options.SwaggerEndpoint("/swagger/v1/swagger.json", "MyProjectName API"); |
|
|
|
}); |
|
|
|
*/ |
|
|
|
|
|
|
|
app.UseAuditing(); |
|
|
|
app.UseMvcWithDefaultRouteAndArea(); |
|
|
|
} |
|
|
|
|