Address feedback from peer review

This commit is contained in:
Safia Abdalla 2021-10-11 15:28:33 -07:00 committed by GitHub
parent 80ae726761
commit 8672ff5f01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,4 +163,11 @@ You can workaround this by always providing a non-zero and non-minimum value for
**Customizing WebRootPath not supported for minimal applications**
There is a known issue with modifying the `WebRootPath` in a minimal app using the `WebApplicationBuilder` as documented in https://github.com/dotnet/aspnetcore/issues/36999. The issue will be resolved in .NET 6 GA. As a workaround, users can use the default `wwwroot` directory for serving static files in their applications.
There is a known issue with modifying the `WebRootPath` in a minimal app using the `WebApplicationBuilder` as documented in https://github.com/dotnet/aspnetcore/issues/36999. The issue will be resolved in .NET 6 RTM. As a workaround, users can use the default `wwwroot` directory for serving static files in their applications. Alternatively, you can invoke `UseStaticFiles` with a `StaticFilesOption` containing both the provider and path.
```csharp
app.UseStaticFiles(new StaticFileOptions
{
ContentTypeProvider = new PhysicalFileProvider("/full/path/to/custom/wwwroot")
});
```