Added filterId to the querylog

Updated the openapi.yaml accordingly
Some minor refactoring/renaming
Fix other review comments
This commit is contained in:
Andrey Meshkov
2018-10-30 12:24:59 +03:00
parent 760e3596b6
commit 591065aa3a
7 changed files with 214 additions and 153 deletions

10
app.go
View File

@@ -119,6 +119,8 @@ func main() {
if err != nil {
log.Fatal(err)
}
// override bind host/port from the console
if bindHost != nil {
config.BindHost = *bindHost
}
@@ -156,7 +158,7 @@ func main() {
address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
runFilterRefreshers()
runFiltersUpdatesTimer()
http.Handle("/", optionalAuthHandler(http.FileServer(box)))
registerControlHandlers()
@@ -309,6 +311,12 @@ func upgradeConfigSchema(oldVersion int, newVersion int) error {
if err != nil {
log.Fatal(err)
}
// Saving it to the filters dir now
err = filter.save()
if err != nil {
log.Fatal(err)
}
}
// No more "dnsfilter.txt", filters are now loaded from config.ourDataDir/filters/