mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
feat: config: validate metrics config (#4130)
This change adds validation for metrics config. In particular, the metrics path is checked to ensure it starts with a / and is not one of the disallowed paths. Signed-off-by: Vishwas Rajashekar <dev@vrajashkr.com>
This commit is contained in:
committed by
GitHub
parent
225e2fb96d
commit
6a143cadfa
@@ -212,4 +212,7 @@ var (
|
||||
ErrCertificateWatcherAlreadyRunning = errors.New("certificate watcher is already running")
|
||||
ErrInvalidEndSessionEndpoint = errors.New("end_session_endpoint must be an absolute http(s) URL")
|
||||
ErrPolicyConditionNotCompiled = errors.New("policy condition not compiled")
|
||||
ErrDisallowedMetricsPath = errors.New("provided metrics path is disallowed")
|
||||
ErrInvalidMetricsPathPrefix = errors.New("metrics path must start with /")
|
||||
ErrInvalidMetricsPath = errors.New("invalid metrics path")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user