mirror of
https://github.com/prometheus-community/ipmi_exporter
synced 2025-02-16 18:56:50 +00:00
This commit is contained in:
parent
ab14984e9a
commit
ee3429f2fd
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
ipmi_exporter
|
||||
*.tar.gz
|
||||
|
||||
# Vscode files
|
||||
.vscode
|
5
main.go
5
main.go
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user