You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/3.middleware/1.rate-limiter.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ type RateLimiter = {
62
62
name:string;
63
63
options:Record<string, any>;
64
64
};
65
+
ipHeader:string;
65
66
};
66
67
```
67
68
@@ -118,3 +119,9 @@ rateLimiter: {
118
119
}
119
120
}
120
121
```
122
+
123
+
### `ipHeader`
124
+
125
+
- Default: `undefined`
126
+
127
+
A custom header name (string) that will be used to determine the IP address of the request. Useful when the default `x-forwarded-for` header can not be used, and you want to use an alternative like [cf-connecting-ip](https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-connecting-ip).
0 commit comments