mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
add rate limiting support for REST API/web admin too
This commit is contained in:
@@ -360,7 +360,8 @@ func canAcceptConnection(ip string) bool {
|
||||
logger.Log(logger.LevelDebug, common.ProtocolSSH, "", "connection refused, configured limit reached")
|
||||
return false
|
||||
}
|
||||
if err := common.LimitRate(common.ProtocolSSH, ip); err != nil {
|
||||
_, err := common.LimitRate(common.ProtocolSSH, ip)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if err := common.Config.ExecutePostConnectHook(ip, common.ProtocolSSH); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user