You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -172,7 +190,7 @@ As mentioned in the previous section, all routes passes to the ProxyTable are by
172
190
}
173
191
</pre>
174
192
175
-
Notice here that I have not included paths on the individual domains because this is not possible when using only the HTTP 'Host' header. Care to learn more? See [RFC2616: HTTP/1.1, Section 14.23, "Host"][1].
193
+
Notice here that I have not included paths on the individual domains because this is not possible when using only the HTTP 'Host' header. Care to learn more? See [RFC2616: HTTP/1.1, Section 14.23, "Host"][4].
176
194
177
195
### Proxy requests with an additional forward proxy
178
196
Sometimes in addition to a reverse proxy, you may want your front-facing server to forward traffic to another location. For example, if you wanted to load test your staging environment. This is possible when using node-http-proxy using similar JSON-based configuration to a proxy table:
@@ -203,6 +221,78 @@ When you install this package with npm, a node-http-proxy binary will become ava
203
221
-h, --help You're staring at it
204
222
</pre>
205
223
224
+
### Proxying over HTTPS
225
+
You have all the full flexibility of node-http-proxy offers in HTTPS as well as HTTP. The two basic scenarios are: with a stand-alone proxy server or in conjunction with another HTTPS server.
Websockets are handled automatically when using the `httpProxy.createServer()`, but if you want to use it in conjunction with a stand-alone HTTP + WebSocket (such as [socket.io][5]) server here's how:
266
+
<pre>
267
+
var http = require('http'),
268
+
httpProxy = require('httpProxy');
269
+
270
+
//
271
+
// Create an instance of node-http-proxy
272
+
//
273
+
var proxy = new httpProxy.HttpProxy();
274
+
275
+
var server = http.createServer(function (req, res) {
0 commit comments