@@ -162,7 +162,7 @@ the tests subdirectory.
162
162
#### Setup a basic stand-alone proxy server
163
163
164
164
``` js
165
- import * as http from " http" ;
165
+ import * as http from " node: http" ;
166
166
import { createProxyServer } from " http-proxy-3" ;
167
167
168
168
// Create your proxy server and set the target in the options.
@@ -192,7 +192,7 @@ This example shows how you can proxy a request using your own HTTP server
192
192
and also you can put your own logic to handle the request.
193
193
194
194
``` js
195
- import * as http from " http" ;
195
+ import * as http from " node: http" ;
196
196
import { createProxyServer } from " http-proxy-3" ;
197
197
198
198
// Create a proxy server with custom application logic
@@ -219,7 +219,7 @@ This example shows how you can proxy a request using your own HTTP server that
219
219
modifies the outgoing proxy request by adding a special header.
220
220
221
221
``` js
222
- import * as http from " http" ;
222
+ import * as http from " node: http" ;
223
223
import { createProxyServer } from " http-proxy-3" ;
224
224
225
225
// Create a proxy server with custom application logic
@@ -261,7 +261,7 @@ Sometimes when you have received a HTML/XML document from the server of origin y
261
261
#### Setup a stand-alone proxy server with latency
262
262
263
263
``` js
264
- import * as http from " http" ;
264
+ import * as http from " node: http" ;
265
265
import { createProxyServer } from " http-proxy-3" ;
266
266
267
267
// Create a proxy server with latency
@@ -372,7 +372,7 @@ httpProxy
372
372
Also you can proxy the websocket requests just calling the ` ws(req, socket, head) ` method.
373
373
374
374
``` js
375
- import * as http from " http" ;
375
+ import * as http from " node: http" ;
376
376
import { createProxyServer } from " http-proxy-3" ;
377
377
378
378
// Setup our server to proxy standard HTTP requests
0 commit comments