http2-proxy
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -182,2 +182,6 @@ const http2 = require('http2') | ||
if (resOrSocket instanceof net.Socket) { | ||
if (onRes) { | ||
onRes(req, resOrSocket) | ||
} | ||
if (!proxyRes.upgrade) { | ||
@@ -184,0 +188,0 @@ resOrSocket.end() |
{ | ||
"name": "http2-proxy", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 --expose-http2 src", |
@@ -112,5 +112,5 @@ # node-http2-proxy | ||
- `options`: options passed to [`http.request(options)`](https://nodejs.org/api/http.html#http_http_request_options_callback) | ||
- `onRes(req, res)`: called before proxy response | ||
- `onRes(req, resOrSocket)`: called before proxy response | ||
- `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) | ||
- `res`: [`http.ServerResponse`](https://nodejs.org/api/http.html#http_http_request_options_callback) or [`http2.Http2ServerResponse`](https://nodejs.org/api/http2.html#http2_class_http2_http2serverresponse) | ||
- `resOrSocket`: For `web` [`http.ServerResponse`](https://nodejs.org/api/http.html#http_http_request_options_callback) 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) | ||
@@ -117,0 +117,0 @@ ### License |
15356
283