oliverbooth.dev/OliverBooth/Middleware/RssEndpointExtensions.cs
Oliver Booth 0a9c2e82d5
refactor: combine sites into one
CORS was "cors"ing some issues (heh).

But also it is easier to maintain this way. Development was made much more difficult when I separated it. Combining it all also improves SEO
2023-08-13 17:34:38 +01:00

14 lines
421 B
C#

namespace OliverBooth.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");
}
}