diff --git a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs index 8db74d0ad..e5c3fb178 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.Configure.cs @@ -1,4 +1,5 @@ using DotNetCore.CAP; +using LINGYUN.Abp.BlobStoring.OssManagement; using LINGYUN.Abp.Localization.CultureMap; using LINGYUN.Abp.LocalizationManagement; using LINGYUN.Abp.OpenIddict.AspNetCore.Session; @@ -9,6 +10,7 @@ using LINGYUN.Abp.OpenIddict.WeChat; using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using LINGYUN.Abp.WeChat.Work; +using LINGYUN.Abp.Wrapper; using Medallion.Threading; using Medallion.Threading.Redis; using Microsoft.AspNetCore.Authentication; @@ -34,9 +36,11 @@ using System.Text.Unicode; using Volo.Abp.Account.Localization; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Auditing; +using Volo.Abp.BlobStoring; using Volo.Abp.Caching; using Volo.Abp.FeatureManagement; using Volo.Abp.GlobalFeatures; +using Volo.Abp.Http.Client; using Volo.Abp.Json; using Volo.Abp.Json.SystemTextJson; using Volo.Abp.Localization; @@ -212,6 +216,20 @@ public partial class AuthServerModule } } + private void ConfigureBlobStoring(IConfiguration configuration) + { + Configure(options => + { + options.Containers.ConfigureAll((containerName, containerConfiguration) => + { + containerConfiguration.UseOssManagement(config => + { + configuration.GetSection("OssManagement").Bind(config); + }); + }); + }); + } + private void ConfigureCaching(IConfiguration configuration) { Configure(options => @@ -399,4 +417,17 @@ public partial class AuthServerModule }); }); } + + private void PreConfigureWrapper() + { + PreConfigure(options => + { + // http服务间调用发送不需要包装结果的请求头 + options.ProxyClientActions.Add( + (_, _, client) => + { + client.DefaultRequestHeaders.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true"); + }); + }); + } } diff --git a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs index 0fe58bfb3..cb6e71092 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/AuthServerModule.cs @@ -5,6 +5,7 @@ using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; using LINGYUN.Abp.AuditLogging.Elasticsearch; using LINGYUN.Abp.Authentication.QQ; using LINGYUN.Abp.Authentication.WeChat; +using LINGYUN.Abp.BlobStoring.OssManagement; using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Emailing.Platform; using LINGYUN.Abp.EventBus.CAP; @@ -15,6 +16,7 @@ using LINGYUN.Abp.Identity.AspNetCore.Session; using LINGYUN.Abp.Identity.OrganizaztionUnits; using LINGYUN.Abp.Identity.Session.AspNetCore; using LINGYUN.Abp.Localization.CultureMap; +using LINGYUN.Abp.OpenIddict.AspNetCore; using LINGYUN.Abp.OpenIddict.AspNetCore.Session; using LINGYUN.Abp.OpenIddict.LinkUser; using LINGYUN.Abp.OpenIddict.Portal; @@ -48,6 +50,7 @@ namespace LY.MicroService.AuthServer; typeof(AbpAccountApplicationModule), typeof(AbpAccountHttpApiModule), typeof(AbpAccountWebOpenIddictModule), + typeof(AbpBlobStoringOssManagementModule), typeof(AbpGdprApplicationModule), typeof(AbpGdprHttpApiModule), typeof(AbpGdprWebModule), @@ -87,6 +90,7 @@ public partial class AuthServerModule : AbpModule var hostingEnvironment = context.Services.GetHostingEnvironment(); PreConfigureAuth(); + PreConfigureWrapper(); PreConfigureFeature(); PreForwardedHeaders(); PreConfigureApp(configuration); @@ -99,6 +103,7 @@ public partial class AuthServerModule : AbpModule var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); + ConfigureBlobStoring(configuration); ConfigureCaching(configuration); ConfigureIdentity(configuration); ConfigureVirtualFileSystem(); diff --git a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj index 6966dca54..adf0bca71 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj +++ b/aspnet-core/services/LY.MicroService.AuthServer/LY.MicroService.AuthServer.csproj @@ -80,6 +80,7 @@ + @@ -88,4 +89,10 @@ + + + PreserveNewest + + + diff --git a/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx b/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx index 9843cc189..52ec5f902 100644 Binary files a/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx and b/aspnet-core/services/LY.MicroService.AuthServer/openiddict.pfx differ