C# Class Microsoft.AspNetCore.SpaServices.Webpack.ConditionalProxyMiddleware

Based on https://github.com/aspnet/Proxy/blob/dev/src/Microsoft.AspNetCore.Proxy/ProxyMiddleware.cs Differs in that, if the proxied request returns a 404, we pass through to the next middleware in the chain This is useful for Webpack middleware, because it lets you fall back on prebuilt files on disk for chunks not exposed by the current Webpack config (e.g., DLL/vendor chunks).
Datei anzeigen Open project: aspnet/JavaScriptServices

Public Methods

Method Description
ConditionalProxyMiddleware ( RequestDelegate next, string pathPrefix, ConditionalProxyMiddlewareOptions options ) : System
Invoke ( HttpContext context ) : System.Threading.Tasks.Task

Private Methods

Method Description
PerformProxyRequest ( HttpContext context ) : Task

Method Details

ConditionalProxyMiddleware() public method

public ConditionalProxyMiddleware ( RequestDelegate next, string pathPrefix, ConditionalProxyMiddlewareOptions options ) : System
next RequestDelegate
pathPrefix string
options ConditionalProxyMiddlewareOptions
return System

Invoke() public method

public Invoke ( HttpContext context ) : System.Threading.Tasks.Task
context HttpContext
return System.Threading.Tasks.Task