Skip to content

Instantly share code, notes, and snippets.

@CoreProgramm
Created April 24, 2020 17:01
Show Gist options
  • Save CoreProgramm/8a9c3a2516e018ca3ec82fb08570ecb0 to your computer and use it in GitHub Desktop.
Save CoreProgramm/8a9c3a2516e018ca3ec82fb08570ecb0 to your computer and use it in GitHub Desktop.
Static Files in ASP .NET Core
FileServerOptions fileServerOptions = new FileServerOptions();
fileServerOptions.DefaultFilesOptions.DefaultFileNames.Clear();
fileServerOptions.DefaultFilesOptions.DefaultFileNames.Add("custom.html");
app.UseFileServer(fileServerOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment