Remove some dead code in Blazor hosting

This commit is contained in:
Ryan Nowak 2019-07-03 13:58:21 -07:00
parent 1b6f721648
commit d8b1af39f0
1 changed files with 0 additions and 12 deletions

View File

@ -168,19 +168,7 @@ namespace Microsoft.AspNetCore.Builder
throw new ArgumentNullException(nameof(filePath));
}
var config = BlazorConfig.Read(clientAssemblyFilePath);
// We want to serve "index.html" from whichever directory contains it in this priority order:
// 1. Client app "dist" directory
// 2. Client app "wwwroot" directory
// 3. Server app "wwwroot" directory
var directory = endpoints.ServiceProvider.GetRequiredService<IWebHostEnvironment>().WebRootPath;
var indexHtml = config.FindIndexHtmlFile();
if (indexHtml != null)
{
directory = Path.GetDirectoryName(indexHtml);
}
var options = new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(directory),