Move all routing tokens (incl. API versioning) to Web.Common (#14231)

* Move all routing tokens (incl. API versioning) to Cms.Web.Common, so the site can start without adding the delivery API in Startup

* Fixed merge

* Fix backwards compat
This commit is contained in:
Kenn Jacobsen
2023-05-11 08:18:43 +02:00
committed by GitHub
parent f804c8c209
commit f4ee0d027a
14 changed files with 43 additions and 49 deletions

View File

@@ -46,6 +46,7 @@ using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax;
using Umbraco.Cms.Web.Common;
using Umbraco.Cms.Web.Common.ApplicationModels;
using Umbraco.Cms.Web.Common.AspNetCore;
using Umbraco.Cms.Web.Common.Configuration;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.DependencyInjection;
using Umbraco.Cms.Web.Common.FileProviders;
@@ -291,6 +292,9 @@ public static partial class UmbracoBuilderExtensions
options.Cookie.HttpOnly = true;
});
builder.Services.ConfigureOptions<ConfigureApiVersioningOptions>();
builder.Services.ConfigureOptions<ConfigureApiExplorerOptions>();
builder.Services.AddApiVersioning().AddApiExplorer();
builder.Services.ConfigureOptions<UmbracoMvcConfigureOptions>();
builder.Services.ConfigureOptions<UmbracoRequestLocalizationOptions>();
builder.Services.TryAddEnumerable(ServiceDescriptor