Oliver Booth
e8bc50bbdf
I'd ideally like to keep the blog. subdomain the same, and while there are a few ways to achieve this it is much simpler to just dedicate a separate application for the subdomain. This change also adjusts the webhost builder extensions to default to ports 443/80, and each app now explicitly sets the port it needs.
14 lines
426 B
C#
14 lines
426 B
C#
namespace OliverBooth.Blog.Middleware;
|
|
|
|
internal static class RssEndpointExtensions
|
|
{
|
|
public static IEndpointConventionBuilder MapRssFeed(this IEndpointRouteBuilder endpoints, string pattern)
|
|
{
|
|
RequestDelegate pipeline = endpoints.CreateApplicationBuilder()
|
|
.UseMiddleware<RssMiddleware>()
|
|
.Build();
|
|
|
|
return endpoints.Map(pattern, pipeline).WithDisplayName("RSS Feed");
|
|
}
|
|
}
|