Merge pull request #33529 from jabreu610/patch-1

Add missing property boolean `followRedirects` for @types/http-proxy
This commit is contained in:
Nathan Shively-Sanders
2019-03-07 15:46:23 -08:00
committed by GitHub
+10 -3
View File
@@ -1,8 +1,9 @@
// Type definitions for node-http-proxy 1.16
// Type definitions for node-http-proxy 1.17
// Project: https://github.com/nodejitsu/node-http-proxy
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
// Florian Oellerich <https://github.com/Raigen>
// Daniel Schmidt <https://github.com/DanielMSchmidt>
// Jordan Abreu <https://github.com/jabreu610>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
@@ -165,8 +166,6 @@ declare class Server extends events.EventEmitter {
declare namespace Server {
interface ServerOptions {
/** Buffer */
buffer?: stream.Stream;
/** URL string to be parsed with the url module. */
target?: ProxyTargetUrl;
/** URL string to be parsed with the url module. */
@@ -203,12 +202,20 @@ declare namespace Server {
protocolRewrite?: string;
/** rewrites domain of set-cookie headers. */
cookieDomainRewrite?: false | string | {[oldDomain: string]: string};
/** rewrites path of set-cookie headers. Default: false */
cookiePathRewrite?: false | string | {[oldPath: string]: string};
/** object with extra headers to be added to target requests. */
headers?: {[header: string]: string};
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
proxyTimeout?: number;
/** Timeout (in milliseconds) for incoming requests */
timeout?: number;
/** Specify whether you want to follow redirects. Default: false */
followRedirects?: boolean;
/** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
selfHandleResponse?: boolean;
/** Buffer */
buffer?: stream.Stream;
}
}