mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
provide argument option as already parsed url to http-proxy (#25164)
This commit is contained in:
@@ -24,3 +24,11 @@ proxy.on("start", (req, res, target) => {
|
||||
http.createServer((req, res) => {
|
||||
proxy.web(req, res);
|
||||
});
|
||||
|
||||
const newProxy = HttpProxy.createProxyServer({
|
||||
target: {
|
||||
host: 'localhost',
|
||||
port: '9015'
|
||||
},
|
||||
ws: true
|
||||
});
|
||||
|
||||
Vendored
+5
-3
@@ -1,6 +1,8 @@
|
||||
// Type definitions for node-http-proxy 1.16
|
||||
// Project: https://github.com/nodejitsu/node-http-proxy
|
||||
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>, Florian Oellerich <https://github.com/Raigen>
|
||||
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
|
||||
// Florian Oellerich <https://github.com/Raigen>
|
||||
// Daniel Schmidt <https://github.com/DanielMSchmidt>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -166,9 +168,9 @@ declare namespace Server {
|
||||
/** Buffer */
|
||||
buffer?: stream.Stream;
|
||||
/** URL string to be parsed with the url module. */
|
||||
target?: string;
|
||||
target?: ProxyTargetUrl;
|
||||
/** URL string to be parsed with the url module. */
|
||||
forward?: string;
|
||||
forward?: ProxyTargetUrl;
|
||||
/** Object to be passed to http(s).request. */
|
||||
agent?: any;
|
||||
/** Object to be passed to https.createServer(). */
|
||||
|
||||
Reference in New Issue
Block a user