Load config on page load

This commit is contained in:
Locria Cyber 2023-10-01 08:49:02 +00:00
parent 3bb3c91907
commit 1c7776be3b
Signed by: iacore
GPG key ID: F8C16E5157A63006

View file

@ -32,6 +32,13 @@ func rootPage(w http.ResponseWriter, r *http.Request) {
return
}
config_new, err := core.LoadConfig()
if err != nil {
log.Println("[WARN] failed to load config:", err)
} else {
config = config_new
}
// get service status'
var data []scanner.ServiceStatus
for _, v := range config.Service {