DefaultFilesMiddleware Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This examines a directory path and determines if there is a default file present. If so the file name is appended to the path and execution continues. Note we don't just serve the file because it may require interpretation.
public ref class DefaultFilesMiddleware
public class DefaultFilesMiddleware
type DefaultFilesMiddleware = class
Public Class DefaultFilesMiddleware
- Inheritance
-
DefaultFilesMiddleware
Constructors
DefaultFilesMiddleware(RequestDelegate, IHostingEnvironment, IOptions<DefaultFilesOptions>) |
Creates a new instance of the DefaultFilesMiddleware. |
DefaultFilesMiddleware(RequestDelegate, IWebHostEnvironment, IOptions<DefaultFilesOptions>) |
Creates a new instance of the DefaultFilesMiddleware. |
Methods
Invoke(HttpContext) |
This examines the request to see if it matches a configured directory, and if there are any files with the configured default names in that directory. If so this will append the corresponding file name to the request path for a later middleware to handle. |