diff --git a/main.go b/main.go index 16d0efd..30199f1 100644 --- a/main.go +++ b/main.go @@ -30,11 +30,10 @@ type SlackConfig struct { // PostHandler send notifications from synology to slack func PostHandler(w http.ResponseWriter, r *http.Request) { - var api_key = r.Header.Get("api_key") + log.Printf(r.Header) if r.Header.Get("api_key") != appConfig.APIKey { http.Error(w, "invalid api key", http.StatusUnauthorized) log.Printf("invalid api key") - log.Printf("Received key: ", api_key) return }