Class FallbackMiddleware
- Namespace
- DuetWebServer.Middleware
- Assembly
- DuetWebServer.dll
Middleware class to redirect GET requests without dot in the path to the main index file
public class FallbackMiddleware
- Inheritance
-
FallbackMiddleware
- Inherited Members
Constructors
FallbackMiddleware(RequestDelegate, ILogger<FallbackMiddleware>)
Middleware class to redirect GET requests without dot in the path to the main index file
public FallbackMiddleware(RequestDelegate next, ILogger<FallbackMiddleware> logger)
Parameters
nextRequestDelegateNext request delegate
loggerILogger<FallbackMiddleware>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
public Task InvokeAsync(HttpContext context)
Parameters
contextHttpContextHTTP context
Returns
- Task
Asynchronous task