You've already forked caddy-opnsense-blocker
Cache IP intelligence and add allowed filter
This commit is contained in:
@@ -191,9 +191,6 @@ func (c *Config) applyDefaults() error {
|
||||
if c.Investigation.BackgroundPollInterval.Duration == 0 {
|
||||
c.Investigation.BackgroundPollInterval.Duration = 30 * time.Second
|
||||
}
|
||||
if c.Investigation.BackgroundLookback.Duration == 0 {
|
||||
c.Investigation.BackgroundLookback.Duration = 24 * time.Hour
|
||||
}
|
||||
if c.Investigation.BackgroundBatchSize == 0 {
|
||||
c.Investigation.BackgroundBatchSize = 256
|
||||
}
|
||||
|
||||
@@ -73,6 +73,9 @@ sources:
|
||||
if got, want := cfg.OPNsense.APISecret, "test-secret"; got != want {
|
||||
t.Fatalf("unexpected api secret: got %q want %q", got, want)
|
||||
}
|
||||
if got := cfg.Investigation.BackgroundLookback.Duration; got != 0 {
|
||||
t.Fatalf("unexpected background lookback default: got %s want 0", got)
|
||||
}
|
||||
profile := cfg.Profiles["main"]
|
||||
if !profile.IsAllowedPostPath("/search") {
|
||||
t.Fatalf("expected /search to be normalized as an allowed POST path")
|
||||
|
||||
Reference in New Issue
Block a user