More debug code
This commit is contained in:
parent
76c92a0da9
commit
f9f254e9fc
3
main.go
3
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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user