More debug
This commit is contained in:
parent
537d33bb31
commit
46f6476f05
2
main.go
2
main.go
@ -30,7 +30,7 @@ type SlackConfig struct {
|
|||||||
|
|
||||||
// PostHandler send notifications from synology to slack
|
// PostHandler send notifications from synology to slack
|
||||||
func PostHandler(w http.ResponseWriter, r *http.Request) {
|
func PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
api = r.Header.Get("api_key")
|
api := r.Header.Get("api_key")
|
||||||
if r.Header.Get("api_key") != appConfig.APIKey {
|
if r.Header.Get("api_key") != appConfig.APIKey {
|
||||||
http.Error(w, "invalid api key", http.StatusUnauthorized)
|
http.Error(w, "invalid api key", http.StatusUnauthorized)
|
||||||
log.Printf("invalid api key: %s", api)
|
log.Printf("invalid api key: %s", api)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user