More debug
This commit is contained in:
parent
699d101ca5
commit
537d33bb31
4
main.go
4
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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user