Pull request: 2875 fix client filtering settings
Merge in DNS/adguard-home from 2875-client-filtering to master Updates #2875. Squashed commit of the following: commit b3b9582b7dde826005ba79d499ed7e82af067e93 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon May 24 14:22:29 2021 +0300 all: use atomic, log changes commit 9304d8b96d0d064d7741c85165ab885f5547fd4c Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon May 24 13:43:22 2021 +0300 all: fix client filtering settings
This commit is contained in:
@@ -351,8 +351,14 @@ func (f *Filtering) handleFilteringConfig(w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
|
||||
config.DNS.FilteringEnabled = req.Enabled
|
||||
config.DNS.FiltersUpdateIntervalHours = req.Interval
|
||||
func() {
|
||||
config.Lock()
|
||||
defer config.Unlock()
|
||||
|
||||
config.DNS.FilteringEnabled = req.Enabled
|
||||
config.DNS.FiltersUpdateIntervalHours = req.Interval
|
||||
}()
|
||||
|
||||
onConfigModified()
|
||||
enableFilters(true)
|
||||
}
|
||||
@@ -364,7 +370,6 @@ type checkHostRespRule struct {
|
||||
|
||||
type checkHostResp struct {
|
||||
Reason string `json:"reason"`
|
||||
|
||||
// FilterID is the ID of the rule's filter list.
|
||||
//
|
||||
// Deprecated: Use Rules[*].FilterListID.
|
||||
|
||||
Reference in New Issue
Block a user