We are using this good old approach since v10ish to inject normal ASP.NET endpoints, e.g., for sitemap.xml
:
builder.Services.Configure<UmbracoPipelineOptions>(options =>
options.AddFilter(new UmbracoPipelineFilter(nameof(SitemapController))
Endpoints = app => app.UseEndpoints(endpoints =>
endpoints.MapControllerRoute(..., "sitemap.xml", ...
This works fine in development in v15, but in Azure with runtime mode Production we get straight up 404s for all these endpoints. The same thing works fine in v13 and below.
We have employed the HandleAsServerSideRequest
trick to get an Umbraco context since v13.4. Custom UmbracoPageController using custom routes can no longer get UmbracoContext · Issue #16969 · umbraco/Umbraco-CMS · GitHub
Anyone know why this could be, or how I can debug it?
The code above runs in a regular IComposer
.
Could it have to do with the 404 behavior itself somehow?