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
@@ -316,6 +316,7 @@ Subscribe to [http-proxy events](https://github.com/nodejitsu/node-http-proxy#li
316
316
```
317
317
318
318
-**option.onClose**: function, subscribe to http-proxy's `close` event.
319
+
319
320
```javascript
320
321
functiononClose(res, socket, head) {
321
322
// view disconnected websocket connections
@@ -349,7 +350,7 @@ The following options are provided by the underlying [http-proxy](https://github
349
350
- String: new domain, for example `cookieDomainRewrite: "new.domain"`. To remove the domain, use `cookieDomainRewrite: ""`.
350
351
- Object: mapping of domains to new domains, use `"*"` to match all domains.
351
352
For example keep one domain unchanged, rewrite one domain and remove other domains:
352
-
```
353
+
```json
353
354
cookieDomainRewrite: {
354
355
"unchanged.domain": "unchanged.domain",
355
356
"old.domain": "new.domain",
@@ -361,7 +362,7 @@ The following options are provided by the underlying [http-proxy](https://github
361
362
- String: new path, for example `cookiePathRewrite: "/newPath/"`. To remove the path, use `cookiePathRewrite: ""`. To set path to root use `cookiePathRewrite: "/"`.
362
363
- Object: mapping of paths to new paths, use `"*"` to match all paths.
363
364
For example, to keep one path unchanged, rewrite one path and remove other paths:
364
-
```
365
+
```json
365
366
cookiePathRewrite: {
366
367
"/unchanged.path/": "/unchanged.path/",
367
368
"/old.path/": "/new.path/",
@@ -375,20 +376,23 @@ The following options are provided by the underlying [http-proxy](https://github
375
376
- **option.selfHandleResponse** true/false, 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
376
377
- **option.buffer**: stream of data to send as the request body. Maybe you have some middleware that consumes the request stream before proxying it on e.g. If you read the body of a request into a field called 'req.rawbody' you could restream this field in the buffer option:
0 commit comments