fix secret handling by bearer_token
This commit is contained in:
parent
a57257af26
commit
5b2750557f
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue