mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
add better diagnostics for rate limits
This commit is contained in:
parent
25f4d98307
commit
715cb98e95
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ class Middleware::RequestTracker
|
||||||
limiter60.performed!
|
limiter60.performed!
|
||||||
rescue RateLimiter::LimitExceeded
|
rescue RateLimiter::LimitExceeded
|
||||||
if GlobalSetting.max_requests_per_ip_mode == "warn"
|
if GlobalSetting.max_requests_per_ip_mode == "warn"
|
||||||
Rails.logger.warn("Global IP rate limit exceeded for #{ip}: #{type} second rate limit")
|
Rails.logger.warn("Global IP rate limit exceeded for #{ip}: #{type} second rate limit, uri: #{env["REQUEST_URI"]}")
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue