Merge pull request #32142 from CelineBen/http-proxy-middleware

[http-proxy-middleware] Set config as optional parameter
This commit is contained in:
Daniel Rosenwasser
2019-01-15 15:51:15 -08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
@@ -140,3 +140,6 @@ proxy({
proxy({
headers: {host: 'www.example.org'}
});
// Shorthands
proxy('/');
+1 -1
View File
@@ -15,7 +15,7 @@ import * as httpProxy from "http-proxy";
import { Readable } from 'stream';
declare function proxy(config: proxy.Config): proxy.Proxy;
declare function proxy(contextOrUri: string | string[] | proxy.Filter, config: proxy.Config): proxy.Proxy;
declare function proxy(contextOrUri: string | string[] | proxy.Filter, config?: proxy.Config): proxy.Proxy;
declare namespace proxy {
type Filter = (pathname: string, req: http.IncomingMessage) => boolean;