Browse Source

Merge pull request #21642 from abpframework/AllowedExtraWebContentFolders

Use `UseVirtualStaticFiles` for `AllowedExtraWebContentFolders` first.
pull/21645/head
Engincan VESKE 2 years ago
committed by GitHub
parent
commit
9dbc95d672
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs

4
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."); throw new AbpException("The app(IApplicationBuilder) is not an IEndpointRouteBuilder.");
} }
app.UseVirtualStaticFiles();
var options = app.ApplicationServices.GetRequiredService<IOptions<AbpAspNetCoreContentOptions>>().Value; var options = app.ApplicationServices.GetRequiredService<IOptions<AbpAspNetCoreContentOptions>>().Value;
foreach (var folder in options.AllowedExtraWebContentFolders) foreach (var folder in options.AllowedExtraWebContentFolders)
{ {
app.UseVirtualStaticFiles(folder); app.UseVirtualStaticFiles(folder);
} }
app.UseVirtualStaticFiles();
return endpoints.MapStaticAssets(staticAssetsManifestPath); return endpoints.MapStaticAssets(staticAssetsManifestPath);
} }

Loading…
Cancel
Save