defender: allow hot-reloading for safe and block lists

This commit is contained in:
Nicola Murino
2021-01-04 17:52:14 +01:00
parent c3410a3d91
commit 72b2c83392
11 changed files with 68 additions and 68 deletions

View File

@@ -126,6 +126,15 @@ func Initialize(c Configuration) error {
return nil
}
// ReloadDefender reloads the defender's block and safe lists
func ReloadDefender() error {
if Config.defender == nil {
return nil
}
return Config.defender.Reload()
}
// IsBanned returns true if the specified IP address is banned
func IsBanned(ip string) bool {
if Config.defender == nil {