fix secret handling by bearer_token
This commit is contained in:
parent
10325aa7a8
commit
e618ea062d
|
@ -45,8 +45,9 @@ func init() {
|
||||||
logger = logger.WithField("body", content)
|
logger = logger.WithField("body", content)
|
||||||
|
|
||||||
ok := false
|
ok := false
|
||||||
|
token := strings.TrimSpace(strings.TrimPrefix(r.Header.Get("Authorization"), "Bearer "))
|
||||||
for _, hook := range hooks {
|
for _, hook := range hooks {
|
||||||
if request.ExternalURL != hook.Secret {
|
if token != hook.Secret {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logger.Infof("run hook")
|
logger.Infof("run hook")
|
||||||
|
|
Loading…
Reference in New Issue