Skip to content

Commit

Permalink
[doc] Improve FAQ example for X-Forwarded-For header (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zolmeister authored and lpinca committed Apr 11, 2018
1 parent c801e99 commit 0100d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -351,7 +351,7 @@ the `X-Forwarded-For` header.

```js
wss.on('connection', function connection(ws, req) {
const ip = req.headers['x-forwarded-for'];
const ip = req.headers['x-forwarded-for'].split(/\s*,\s*/)[0];
});
```

Expand Down

0 comments on commit 0100d82

Please sign in to comment.