diff --git a/prometheus/main.go b/prometheus/main.go index 8b2cd19..316d336 100644 --- a/prometheus/main.go +++ b/prometheus/main.go @@ -45,8 +45,9 @@ func init() { logger = logger.WithField("body", content) ok := false + token := strings.TrimSpace(strings.TrimPrefix(r.Header.Get("Authorization"), "Bearer ")) for _, hook := range hooks { - if request.ExternalURL != hook.Secret { + if token != hook.Secret { continue } logger.Infof("run hook")