chore: add x-authz-checks debug header when running in dev mode (#16873)

This commit is contained in:
ケイラ
2025-04-10 10:36:27 -07:00
committed by GitHub
parent 25fb34cabe
commit 46d4b28384
9 changed files with 162 additions and 11 deletions

View File

@ -71,6 +71,9 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
}
if options.Options.Authorizer == nil {
options.Options.Authorizer = rbac.NewCachingAuthorizer(options.PrometheusRegistry)
if buildinfo.IsDev() {
options.Authorizer = rbac.Recorder(options.Authorizer)
}
}
if options.ReplicaErrorGracePeriod == 0 {
// This will prevent the error from being shown for a minute