mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Move token logs to trace
This commit is contained in:
parent
6a7e5a959b
commit
028f19ac47
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ func New(token string) *API {
|
|||
func (api *API) RequireToken(fn http.HandlerFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Header.Get("Authorization") != fmt.Sprintf("Bearer %s", api.Token) {
|
||||
log.Errorf("Invalid token \"%s\"", r.Header.Get("Authorization"))
|
||||
log.Debugf("Expected token to be \"%s\"", api.Token)
|
||||
log.Tracef("Invalid token \"%s\"", r.Header.Get("Authorization"))
|
||||
log.Tracef("Expected token to be \"%s\"", api.Token)
|
||||
return
|
||||
}
|
||||
log.Debug("Valid token found.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue