This commit is contained in:
Alexander Fahlke 2018-08-10 17:42:19 +02:00
parent ab14984e9a
commit ee3429f2fd
2 changed files with 6 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
ipmi_exporter
*.tar.gz
# Vscode files
.vscode

View File

@ -58,8 +58,9 @@ func updateConfiguration(w http.ResponseWriter, r *http.Request) {
http.Error(w, fmt.Sprintf("failed to reload config: %s", err), http.StatusInternalServerError)
}
default:
log.Errorf("POST method expected")
http.Error(w, "POST method expected", 400)
log.Errorf("Only POST requests allowed for %s", r.URL)
w.Header().Set("Allow", "POST")
http.Error(w, "Only POST requests allowed", http.StatusMethodNotAllowed)
}
}