mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Prometheus: keep auth by default
Restore the previous behaviour where the Prometheus /metrics endpoint required auth if auth was enabled. A new -prometheus-no-auth flag allows you to override this and disable auth for that specific endpoint.
This commit is contained in:
committed by
Alexander Neumann
parent
32c138aa84
commit
9db2d52fbe
@@ -50,6 +50,7 @@ func init() {
|
||||
flags.BoolVar(&server.AppendOnly, "append-only", server.AppendOnly, "enable append only mode")
|
||||
flags.BoolVar(&server.PrivateRepos, "private-repos", server.PrivateRepos, "users can only access their private repo")
|
||||
flags.BoolVar(&server.Prometheus, "prometheus", server.Prometheus, "enable Prometheus metrics")
|
||||
flags.BoolVar(&server.Prometheus, "prometheus-no-auth", server.PrometheusNoAuth, "disable auth for Prometheus /metrics endpoint")
|
||||
flags.BoolVarP(&showVersion, "version", "V", showVersion, "output version and exit")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user