Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var options = new FileServerOptions
{
EnableDirectoryBrowsing = true,
EnableDefaultFiles = true,
DefaultFilesOptions = { DefaultFileNames = {"index.html"}},
FileSystem = new PhysicalFileSystem("Assets"),
StaticFileOptions = { ContentTypeProvider = new CustomContentTypeProvider() }
};
app.UseFileServer(options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment