mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00: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:
parent
32c138aa84
commit
9db2d52fbe
3 changed files with 31 additions and 16 deletions
29
handlers.go
29
handlers.go
|
@ -14,20 +14,21 @@ import (
|
|||
|
||||
// Server encapsulates the rest-server's settings and repo management logic
|
||||
type Server struct {
|
||||
Path string
|
||||
Listen string
|
||||
Log string
|
||||
CPUProfile string
|
||||
TLSKey string
|
||||
TLSCert string
|
||||
TLS bool
|
||||
NoAuth bool
|
||||
AppendOnly bool
|
||||
PrivateRepos bool
|
||||
Prometheus bool
|
||||
Debug bool
|
||||
MaxRepoSize int64
|
||||
PanicOnError bool
|
||||
Path string
|
||||
Listen string
|
||||
Log string
|
||||
CPUProfile string
|
||||
TLSKey string
|
||||
TLSCert string
|
||||
TLS bool
|
||||
NoAuth bool
|
||||
AppendOnly bool
|
||||
PrivateRepos bool
|
||||
Prometheus bool
|
||||
PrometheusNoAuth bool
|
||||
Debug bool
|
||||
MaxRepoSize int64
|
||||
PanicOnError bool
|
||||
|
||||
htpasswdFile *HtpasswdFile
|
||||
quotaManager *quota.Manager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue