Skip to content

Commit 8e82a17

Browse files
committed
docs: Upgrade README
1 parent 81a3f87 commit 8e82a17

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# node-http2-proxy
22

3-
A simple high performance http/2 & http/1.1 to http/1.1 spec compliant proxy helper for Node.
3+
A simple high performance http/2 & http/1 to http/1 spec compliant proxy helper for Node.
44

55
### Features
66

7-
- Proxies HTTP 2, HTTP 1.1 and WebSocket
7+
- Proxies HTTP 2, HTTP 1 and WebSocket
88
- Simple and high performance
99
- [Hop by hop header handling](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).
1010
- [Connection header handling](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection)
@@ -33,7 +33,7 @@ const server = http2.createServer({ allowHTTP1: true })
3333
server.listen(8000)
3434
```
3535

36-
#### Proxy HTTP/2, HTTP/1.1 and WebSocket
36+
#### Proxy HTTP/2, HTTP/1 and WebSocket
3737

3838
```js
3939
server.on('request', (req, res) => {
@@ -162,10 +162,10 @@ server.on('stream', (stream, headers) => {
162162

163163
```javascript
164164
server.on('stream', (stream, headers) => {
165-
proxy.web(stream, { headers }, {
165+
proxy.web(stream, headers, {
166166
hostname: 'localhost'
167167
port: 9000,
168-
onReq: (stream, headers) => {
168+
onReq: (stream, { headers }) => {
169169
headers['x-forwarded-for'] = stream.socket.remoteAddress
170170
headers['x-forwarded-proto'] = stream.socket.encrypted ? 'https' : 'http'
171171
headers['x-forwarded-host'] = stream.headers['host']

0 commit comments

Comments
 (0)