From f9f254e9fc6e2ce70cd0d317e644a51e7594d994 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Fri, 28 Aug 2020 11:43:46 +0800 Subject: [PATCH] More debug code --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 }