mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
filtering: rewrite http
This commit is contained in:
parent
a8e80bc583
commit
e56f465ad8
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,10 @@ func (d *DNSFilter) handleRewriteAdd(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
log.Debug("rewrite: added element: %s -> %s", rw.Domain, rw.Answer)
|
||||
|
||||
d.confLock.Lock()
|
||||
d.Config.Rewrites = d.rewriteStorage.List()
|
||||
d.confLock.Unlock()
|
||||
|
||||
d.Config.ConfigModified()
|
||||
}
|
||||
|
||||
|
@ -54,5 +58,9 @@ func (d *DNSFilter) handleRewriteDelete(w http.ResponseWriter, r *http.Request)
|
|||
return
|
||||
}
|
||||
|
||||
d.confLock.Lock()
|
||||
d.Config.Rewrites = d.rewriteStorage.List()
|
||||
d.confLock.Unlock()
|
||||
|
||||
d.Config.ConfigModified()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue