From 55aab15704ba51d114922986663aa9e8697f4ce3 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 16 Dec 2024 17:01:06 +0800 Subject: [PATCH] Use `UseVirtualStaticFiles` for `AllowedExtraWebContentFolders` first. Resolve #21592 --- .../AspNetCore/Builder/AbpApplicationBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs index 3cada3bf46..1bf3e45e4a 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs @@ -177,14 +177,14 @@ public static class AbpApplicationBuilderExtensions throw new AbpException("The app(IApplicationBuilder) is not an IEndpointRouteBuilder."); } - app.UseVirtualStaticFiles(); - var options = app.ApplicationServices.GetRequiredService>().Value; foreach (var folder in options.AllowedExtraWebContentFolders) { app.UseVirtualStaticFiles(folder); } + app.UseVirtualStaticFiles(); + return endpoints.MapStaticAssets(staticAssetsManifestPath); }