Adds new method WithCustomDefaultMiddleware

To be able to fully customize the default middleware pipeline. Renames some interfaces and methods to be more consistent. Changes the startup builder interface types to be more type safe.
This commit is contained in:
Shannon
2021-07-16 16:04:14 -06:00
parent eec3f0f421
commit ab66a9f33c
15 changed files with 146 additions and 101 deletions

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Extensions
/// </summary>
/// <param name="builder"></param>
/// <returns></returns>
public static IUmbracoMiddlewareBuilder WithWebsite(this IUmbracoMiddlewareBuilder builder)
public static IUmbracoApplicationBuilderContext UseWebsite(this IUmbracoApplicationBuilderContext builder)
{
builder.AppBuilder.UseMiddleware<PublicAccessMiddleware>();
return builder;
@@ -26,7 +26,7 @@ namespace Umbraco.Extensions
/// <summary>
/// Sets up routes for the front-end umbraco website
/// </summary>
public static IUmbracoEndpointBuilder UseWebsiteEndpoints(this IUmbracoEndpointBuilder builder)
public static IUmbracoEndpointBuilderContext UseWebsiteEndpoints(this IUmbracoEndpointBuilderContext builder)
{
if (builder == null)
{