diff --git a/config/config.go b/config/config.go index 48d43fc..3ea330d 100644 --- a/config/config.go +++ b/config/config.go @@ -130,10 +130,10 @@ type WhitelistConfig struct { } type IPFilterConfig struct { - Enabled bool `toml:"enabled"` - EnableAllowList bool `toml:"enableAllowList"` - EnableBlockList bool `toml:"enableBlockList"` - IPFilterFile string + Enabled bool `toml:"enabled"` + EnableAllowList bool `toml:"enableAllowList"` + EnableBlockList bool `toml:"enableBlockList"` + IPFilterFile string `toml:"ipFilterFile"` } /* diff --git a/main.go b/main.go index 52f9fca..6a888ac 100644 --- a/main.go +++ b/main.go @@ -373,6 +373,7 @@ func main() { ipAllowList, ipBlockList, err := auth.ReadIPFilterList(cfg) if err != nil { fmt.Printf("Failed to read IP filter list: %v\n", err) + logger.Errorf("Failed to read IP filter list: %v", err) os.Exit(1) } ipBlockFilter, err := ipfilter.NewIPFilter(ipfilter.IPFilterConfig{ @@ -383,6 +384,7 @@ func main() { }) if err != nil { fmt.Printf("Failed to initialize IP filter: %v\n", err) + logger.Errorf("Failed to initialize IP filter: %v", err) os.Exit(1) } else { r.Use(ipBlockFilter)