update comment and method name

This commit is contained in:
Shannon
2021-07-26 09:49:56 -06:00
parent 0e1c10ca7b
commit 3a229ef8af
2 changed files with 8 additions and 4 deletions

View File

@@ -87,11 +87,10 @@ namespace Umbraco.Cms.Web.Common.ApplicationBuilder
AppBuilder.UseStatusCodePages();
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored.
// TODO: Since we are dependent on these we need to register them but what happens when we call this multiple times since we are dependent on this for UseUmbracoBackOffice too?
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored.
AppBuilder.UseImageSharp();
AppBuilder.UseStaticFiles();
AppBuilder.UseUmbracoPlugins();
AppBuilder.UseUmbracoPluginsStaticFiles();
// UseRouting adds endpoint routing middleware, this means that middlewares registered after this one
// will execute after endpoint routing. The ordering of everything is quite important here, see

View File

@@ -101,7 +101,12 @@ namespace Umbraco.Extensions
return app;
}
public static IApplicationBuilder UseUmbracoPlugins(this IApplicationBuilder app)
/// <summary>
/// Allow static file access for App_Plugins folders
/// </summary>
/// <param name="app"></param>
/// <returns></returns>
public static IApplicationBuilder UseUmbracoPluginsStaticFiles(this IApplicationBuilder app)
{
var hostingEnvironment = app.ApplicationServices.GetRequiredService<IHostingEnvironment>();
var umbracoPluginSettings = app.ApplicationServices.GetRequiredService<IOptions<UmbracoPluginSettings>>();