Skip to content

Commit cf39ef0

Browse files
Merge pull request #2193 from Scrip7/patch-1
docs(security): typo in X-Forwarded-For header
2 parents e889586 + 2456f4e commit cf39ef0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/security/rate-limiting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ There is also the `@Throttle()` decorator which can be used to override the `lim
3939

4040
#### Proxies
4141

42-
If your application runs behind a proxy server, check the specific HTTP adapter options ([express](http://expressjs.com/en/guide/behind-proxies.html) and [fastify](https://www.fastify.io/docs/latest/Server/#trustproxy)) for the `trust proxy` option and enable it. Doing so will allow you to get the original IP address from the `X-Forward-For` header, and you can override the `getTracker()` method to pull the value from the header rather than from `req.ip`. The following example works with both express and fastify:
42+
If your application runs behind a proxy server, check the specific HTTP adapter options ([express](http://expressjs.com/en/guide/behind-proxies.html) and [fastify](https://www.fastify.io/docs/latest/Reference/Server/#trustproxy)) for the `trust proxy` option and enable it. Doing so will allow you to get the original IP address from the `X-Forwarded-For` header, and you can override the `getTracker()` method to pull the value from the header rather than from `req.ip`. The following example works with both express and fastify:
4343

4444
```ts
4545
// throttler-behind-proxy.guard.ts

0 commit comments

Comments
 (0)