natemcmaster / dotnet-serve

Simple command-line HTTPS server for the .NET Core CLI

Home Page:https://nuget.org/packages/dotnet-serve/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add file extension MIME type mapping

Tarmil opened this issue · comments

It would be nice to be able to indicate a custom mapping from file extension to MIME type. My current use case is WebAssembly: the browser refuses to load a wasm module if the MIME type isn't "application/wasm".

Maybe with a syntax like this:

dotnet serve --mime .wasm=application/wasm

LGTM. Let's make a 1.1 release for this.