mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #32142 from CelineBen/http-proxy-middleware
[http-proxy-middleware] Set config as optional parameter
This commit is contained in:
@@ -140,3 +140,6 @@ proxy({
|
||||
proxy({
|
||||
headers: {host: 'www.example.org'}
|
||||
});
|
||||
|
||||
// Shorthands
|
||||
proxy('/');
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user