filtering: rewrite http

This commit is contained in:
Dimitry Kolyshev 2022-12-13 12:34:56 +07:00
parent a8e80bc583
commit e56f465ad8

View file

@ -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()
}