mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-12 08:31:32 +00:00
ignore healthz log
This commit is contained in:
parent
f75c9bcaac
commit
1747a69304
|
@ -50,6 +50,9 @@ func NewRouter(conf *config.Config) *http.ServeMux {
|
||||||
handler = mw(handler)
|
handler = mw(handler)
|
||||||
}
|
}
|
||||||
for _, mw := range middlewares {
|
for _, mw := range middlewares {
|
||||||
|
if route.Path == "/healthz" && conf.SkipHealthzLog {
|
||||||
|
continue
|
||||||
|
}
|
||||||
handler = mw(handler)
|
handler = mw(handler)
|
||||||
}
|
}
|
||||||
router.Handle(route.Path, handler)
|
router.Handle(route.Path, handler)
|
||||||
|
|
|
@ -13,6 +13,7 @@ type Config struct {
|
||||||
ScriptDir string `flag:"scripts" desc:"Scripts location" default:"scripts"`
|
ScriptDir string `flag:"scripts" desc:"Scripts location" default:"scripts"`
|
||||||
PasswdFile string `flag:"passwd-file" desc:"Password file for basic HTTP authentication" default:".htpasswd"`
|
PasswdFile string `flag:"passwd-file" desc:"Password file for basic HTTP authentication" default:".htpasswd"`
|
||||||
LogDir string `flag:"log-dir" desc:"Hook execution logs location" default:""`
|
LogDir string `flag:"log-dir" desc:"Hook execution logs location" default:""`
|
||||||
|
SkipHealthzLog bool `flag:"skip-healthz-log" desc:"Do not log on healthz request" default:"true"`
|
||||||
NotificationURI string `flag:"notification-uri" desc:"Notification URI"`
|
NotificationURI string `flag:"notification-uri" desc:"Notification URI"`
|
||||||
TrustStoreFile string `flag:"trust-store-file" desc:"Trust store used by HTTP signature verifier (.pem or .p12)"`
|
TrustStoreFile string `flag:"trust-store-file" desc:"Trust store used by HTTP signature verifier (.pem or .p12)"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user