diff --git a/internal/filtering/safesearchhttp.go b/internal/filtering/safesearchhttp.go index 05328daab43..26752859037 100644 --- a/internal/filtering/safesearchhttp.go +++ b/internal/filtering/safesearchhttp.go @@ -47,11 +47,12 @@ func (d *DNSFilter) handleSafeSearchSettings(w http.ResponseWriter, r *http.Requ } func() { + defer d.Config.ConfigModified() + d.confLock.Lock() defer d.confLock.Unlock() d.Config.SafeSearchConf = *req - d.Config.ConfigModified() }() aghhttp.OK(w)