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 f1dd6d4d6e..3cada3bf46 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs @@ -126,9 +126,22 @@ public static class AbpApplicationBuilderExtensions { return app.UseMiddleware(); } - + + /// + /// Configures the application to serve static files that match the specified filename patterns with the WebRootFileProvider of the application. + /// + /// The used to configure the application pipeline. + /// The file name patterns to include when serving static files (e.g., "appsettings*.json"). + /// Supports glob patterns. See Glob patterns documentation. + /// + /// The instance. + public static IApplicationBuilder UseStaticFilesForPatterns(this IApplicationBuilder app, params string[] includeFileNamePatterns) + { + return UseStaticFilesForPatterns(app, includeFileNamePatterns, app.ApplicationServices.GetRequiredService().WebRootFileProvider); + } + /// - /// Configures the application to serve static files that match the specified filename patterns. + /// Configures the application to serve static files that match the specified filename patterns with the specified file provider. /// /// The used to configure the application pipeline. /// The file name patterns to include when serving static files (e.g., "appsettings*.json").