Just be careful as think you’ll replace any other modifications by packages/composers
Below is a previous solution to just add your new ones… though I think that still has a caveat, in that it will be last past the post that wins on any duplicates..
provider.Mappings.Add would throw an error for existing duplicates.
new FileExtensionContentTypeProvider() brings 400 default mime types…
using Microsoft.AspNetCore.StaticFiles;
using Umbraco.Cms.Core.Composing;
public class RiveStaticFileComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Services.Configure<StaticFileOptions>(options =>
{
var provider = options.ContentTypeProvider as FileExtensionContentTypeProvider
?? new FileExtensionContentTypeProvider();
provider.Mappings[".riv"] = "application/octet-stream";
options.ContentTypeProvider = provider;
});
}
}