Added api key debug
This commit is contained in:
parent
cf150e6e34
commit
3f809a0ee1
1
main.go
1
main.go
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user