Allow explicit configuration of StaticFileOptions in new SPA APIs. Fixes #1424.

This commit is contained in:
Steve Sanderson
2018-01-02 15:44:59 +00:00
parent 814441c933
commit 15d2f5a898
3 changed files with 51 additions and 28 deletions

View File

@@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.SpaServices
// Developers who need to host more than one SPA with distinct default pages can
// override the file provider
app.UseSpaStaticFilesInternal(
overrideFileProvider: options.DefaultPageFileProvider,
options.DefaultPageStaticFileOptions ?? new StaticFileOptions(),
allowFallbackOnServingWebRootFiles: true);
// If the default file didn't get served as a static file (usually because it was not