v14: Rewrite static assets for the backoffice (#14472)
* add extension method to rewrite requests meant for backoffice static assets * add backoffice rewrites to application builder * embed the umbraco hash into the static assets requested on the backoffice * Added a IStaticFileHostGenerator so its possible to replace our logic * add docs and ensure the path is uniform with single slashes --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -20,6 +20,7 @@ using Umbraco.Cms.Web.BackOffice.Security;
|
||||
using Umbraco.Cms.Web.BackOffice.Services;
|
||||
using Umbraco.Cms.Web.BackOffice.SignalR;
|
||||
using Umbraco.Cms.Web.BackOffice.Trees;
|
||||
using Umbraco.Cms.Web.Common.Hosting;
|
||||
|
||||
namespace Umbraco.Extensions;
|
||||
|
||||
@@ -81,6 +82,7 @@ public static partial class UmbracoBuilderExtensions
|
||||
|
||||
public static IUmbracoBuilder AddBackOfficeCore(this IUmbracoBuilder builder)
|
||||
{
|
||||
builder.Services.AddUnique<IStaticFilePathGenerator, UmbracoStaticFilePathGenerator>();
|
||||
builder.Services.AddSingleton<KeepAliveMiddleware>();
|
||||
builder.Services.ConfigureOptions<ConfigureGlobalOptionsForKeepAliveMiddlware>();
|
||||
builder.Services.AddSingleton<ServerVariablesParser>();
|
||||
|
||||
Reference in New Issue
Block a user