mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 21:52:43 +08:00
Grafana: Enables use of encrypted certificates with password for https (#91418)
This commit is contained in:
@ -92,6 +92,7 @@ type Cfg struct {
|
||||
// HTTP Server Settings
|
||||
CertFile string
|
||||
KeyFile string
|
||||
CertPassword string
|
||||
CertWatchInterval time.Duration
|
||||
HTTPAddr string
|
||||
HTTPPort string
|
||||
@ -1874,11 +1875,13 @@ func (cfg *Cfg) readServerSettings(iniFile *ini.File) error {
|
||||
cfg.Protocol = HTTPSScheme
|
||||
cfg.CertFile = server.Key("cert_file").String()
|
||||
cfg.KeyFile = server.Key("cert_key").String()
|
||||
cfg.CertPassword = server.Key("cert_pass").String()
|
||||
}
|
||||
if protocolStr == "h2" {
|
||||
cfg.Protocol = HTTP2Scheme
|
||||
cfg.CertFile = server.Key("cert_file").String()
|
||||
cfg.KeyFile = server.Key("cert_key").String()
|
||||
cfg.CertPassword = server.Key("cert_pass").String()
|
||||
}
|
||||
if protocolStr == "socket" {
|
||||
cfg.Protocol = SocketScheme
|
||||
|
Reference in New Issue
Block a user