Oliver Booth
0a9c2e82d5
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
14 lines
421 B
C#
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");
|
|
}
|
|
}
|