Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/f55557c4a72d8fb7a35f to your computer and use it in GitHub Desktop.
Save dcomartin/f55557c4a72d8fb7a35f to your computer and use it in GitHub Desktop.
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