Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

EPiServer.Shell.Modules.ModuleInitializer improvement: CreateStaticFileMiddleware should use staticfileoptions from container and not create a new instance.

Found in

EPiServer.CMS.UI 12.0.2

Fixed in

EPiServer.CMS.UI 12.0.3

(Or a related package)

Created

Sep 24, 2021

Updated

Nov 11, 2021

Area

CMS UI

State

Closed, Fixed and tested


Description

CreateStaticFileMiddleware should use staticfileoptions from container and not create a new instance. Partner wants to be able to do the following:

var provider = new FileExtensionContentTypeProvider();
provider.Mappings[".mjs"] = "text/javascript";
app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });