Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added number of hops to function example for "behind-proxies" page #1434

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions en/guide/behind-proxies.md
Expand Up @@ -67,8 +67,8 @@ When using this setting, it is important to ensure there are not multiple, diffe
Custom trust implementation.

```js
app.set('trust proxy', (ip) => {
if (ip === '127.0.0.1' || ip === '123.123.123.123') return true // trusted IPs
app.set('trust proxy', (ip, i) => {
if (i < 1 || ip === '123.123.123.123') return true // first hop or trusted IP
else return false
})
```
Expand Down