Class FallbackMiddleware
Middleware class to redirect GET requests without dot in the path to the main index file
Inherited Members
Namespace: DuetWebServer.Middleware
Assembly: DuetWebServer.dll
Syntax
public class FallbackMiddleware
Constructors
FallbackMiddleware(RequestDelegate, ILogger<FallbackMiddleware>)
Constructor of this middleware
Declaration
public FallbackMiddleware(RequestDelegate next, ILogger<FallbackMiddleware> logger)
Parameters
Type | Name | Description |
---|---|---|
RequestDelegate | next | Next request delegate |
ILogger<FallbackMiddleware> | logger | Logger instance |
Methods
InvokeAsync(HttpContext)
Method that is invoked when a new request is coming in. Redirects pages that could not be found to the index page
Declaration
public Task InvokeAsync(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | HTTP context |
Returns
Type | Description |
---|---|
Task | Asynchronous task |