We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3542e8 commit cf59025Copy full SHA for cf59025
1 file changed
middleware/rate-limit.js
@@ -16,7 +16,8 @@ export default rateLimit({
16
max: 100,
17
18
handler: (request, response, next, options) => {
19
- const tags = [`url:${request.url}`, `ip:${request.ip}`]
+ const ip = request.headers['x-forwarded-for'] || request.ip
20
+ const tags = [`url:${request.url}`, `ip:${ip}`]
21
statsd.increment('rate_limit', 1, tags)
22
// NOTE! At the time of writing, the actual rate limiting is disabled!
23
// At least we can start recording how often this happens in Datadog.
0 commit comments