faucet: log of client
This commit is contained in:
parent
d98b22ba75
commit
8fe7ca0b3b
@ -285,6 +285,7 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
limiter := f.limiter.GetLimiter(ip)
|
limiter := f.limiter.GetLimiter(ip)
|
||||||
if !limiter.Allow() {
|
if !limiter.Allow() {
|
||||||
|
log.Warn("Too many requests from client: ", "client", ip)
|
||||||
http.Error(w, "Too many requests", http.StatusTooManyRequests)
|
http.Error(w, "Too many requests", http.StatusTooManyRequests)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user