Socket
Socket
Sign inDemoInstall

http2-proxy

Package Overview
Dependencies
0
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.7 to 5.0.8

2

package.json
{
"name": "http2-proxy",
"version": "5.0.7",
"version": "5.0.8",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 src",

@@ -153,3 +153,3 @@ # node-http2-proxy

### `async web (req, res, options, [callback])`
### `[async] web (req, res, options[, callback])`

@@ -159,7 +159,7 @@ - `req`: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or [`http2.Http2ServerRequest`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverrequest).

- `options`: See [Options](#options)
- `callback(err, req, res)`: Called on completion or error. Optional.
- `callback(err, req, res)`: Called on completion or error.
See [`request`](https://nodejs.org/api/http.html#http_event_request)
### `async ws (req, socket, head, options, [callback])`
### `[async] ws (req, socket, head, options[, callback])`

@@ -170,3 +170,3 @@ - `req`: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage).

- `options`: See [Options](#options).
- `async allback(err, req, socket, head)`: Called on completion or error. Optional.
- `callback(err, req, socket, head)`: Called on completion or error.

@@ -184,11 +184,11 @@ See [`upgrade`](https://nodejs.org/api/http.html#http_event_upgrade)

- `timeout`: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or [`http2.Http2ServerRequest`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverrequest) timeout.
- `async onReq(req, options, callback)`: Called before proxy request. If returning a truthy value it will be used as the request.
- `[async] onReq(req, options[, callback])`: Called before proxy request. If returning a truthy value it will be used as the request.
- `req`: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or [`http2.Http2ServerRequest`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverrequest)
- `options`: Options passed to [`http.request(options)`](https://nodejs.org/api/http.html#http_http_request_options_callback).
- `callback(err)`: Called on completion or error. Optional.
- `async onRes(req, resOrSocket, proxyRes, callback)`: Called on proxy response. Writing of response must be done inside this method if provided.
- `callback(err)`: Called on completion or error.
- `[async] onRes(req, resOrSocket, proxyRes[, callback])`: Called on proxy response. Writing of response must be done inside this method if provided.
- `req`: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or [`http2.Http2ServerRequest`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverrequest).
- `resOrSocket`: For `web` [`http.ServerResponse`](https://nodejs.org/api/http.html#http_class_http_serverresponse) or [`http2.Http2ServerResponse`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverresponse) and for `ws` [`net.Socket`](https://nodejs.org/api/net.html#net_class_net_socket).
- `proxyRes`: [`http.ServerResponse`](https://nodejs.org/api/http.html#http_class_http_serverresponse).
- `callback(err)`: Called on completion or error. Optional.
- `callback(err)`: Called on completion or error.

@@ -195,0 +195,0 @@ ### License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc