From 537d33bb31bbbb8275c84bb1d5cf56f571725d35 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Fri, 28 Aug 2020 11:49:39 +0800 Subject: [PATCH] More debug --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 413453e..05a29f4 100644 --- a/main.go +++ b/main.go @@ -30,10 +30,10 @@ type SlackConfig struct { // PostHandler send notifications from synology to slack func PostHandler(w http.ResponseWriter, r *http.Request) { - log.Printf(r.Header.Get) + api = r.Header.Get("api_key") if r.Header.Get("api_key") != appConfig.APIKey { http.Error(w, "invalid api key", http.StatusUnauthorized) - log.Printf("invalid api key") + log.Printf("invalid api key: %s", api) return }