Browse Source
Use `UseVirtualStaticFiles` for `AllowedExtraWebContentFolders` first.
Resolve #21592
pull/21642/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
2 additions and
2 deletions
-
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<IOptions<AbpAspNetCoreContentOptions>>().Value; |
|
|
|
foreach (var folder in options.AllowedExtraWebContentFolders) |
|
|
|
{ |
|
|
|
app.UseVirtualStaticFiles(folder); |
|
|
|
} |
|
|
|
|
|
|
|
app.UseVirtualStaticFiles(); |
|
|
|
|
|
|
|
return endpoints.MapStaticAssets(staticAssetsManifestPath); |
|
|
|
} |
|
|
|
|
|
|
|
|