|
|
@ -52,7 +52,6 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule |
|
|
|
LimitedResultRequestDto.MaxMaxResultCount = 100000; |
|
|
|
context.Services.Configure<AbpSequentialGuidGeneratorOptions>(o => o.DefaultSequentialGuidType = SequentialGuidType.SequentialAsString); |
|
|
|
PreConfigureServices(context); |
|
|
|
ConfigureAddCors(); |
|
|
|
ConfigureAntiForgery(); |
|
|
|
ConfigureLocalizationServices(); |
|
|
|
ConfigureAuthentication(); |
|
|
@ -152,9 +151,9 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule |
|
|
|
app.UseCorrelationId(); |
|
|
|
app.UseStaticFiles(); |
|
|
|
app.UseRouting(); |
|
|
|
app.UseCors(); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseJwtTokenMiddleware(); |
|
|
|
app.UseCors(); |
|
|
|
app.UseUnitOfWork(); |
|
|
|
app.UseAuthorization(); |
|
|
|
app.UseSwagger(); |
|
|
@ -186,7 +185,7 @@ public abstract class ModuleBase<T> : AbpModule where T : AbpModule |
|
|
|
|
|
|
|
protected virtual void ConfigureAddCors() |
|
|
|
{ |
|
|
|
var origins = ServiceConfigurationContext.Services.GetConfiguration().GetSection("App:CorsOrigins").Get<string[]>(); |
|
|
|
var origins = ServiceConfigurationContext.Services.GetConfiguration().GetSection("App:CorsOrigins").Get<string[]>() ?? Array.Empty<string>(); |
|
|
|
|
|
|
|
ServiceConfigurationContext.Services.AddCors(options => |
|
|
|
{ |
|
|
|