Added api key debug

This commit is contained in:
Jonathan Ervine 2020-08-28 11:26:21 +08:00
parent cf150e6e34
commit 3f809a0ee1

View File

@ -33,6 +33,7 @@ func PostHandler(w http.ResponseWriter, r *http.Request) {
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") log.Printf("invalid api key")
log.Printf("Received key: ", r.Header.Get("api_key"))
return return
} }