mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Add functions to get config values
This commit is contained in:
parent
d7f66ffa5c
commit
c2fd2e747a
5 changed files with 72 additions and 12 deletions
|
@ -19,15 +19,15 @@ import (
|
|||
)
|
||||
|
||||
func newServer(cfg *config.Config, store *storage.Storage, pool *scheduler.WorkerPool, feedHandler *feed.Handler) *http.Server {
|
||||
certFile := cfg.Get("CERT_FILE", config.DefaultCertFile)
|
||||
keyFile := cfg.Get("KEY_FILE", config.DefaultKeyFile)
|
||||
certDomain := cfg.Get("CERT_DOMAIN", config.DefaultCertDomain)
|
||||
certCache := cfg.Get("CERT_CACHE", config.DefaultCertCache)
|
||||
certFile := cfg.CertFile()
|
||||
keyFile := cfg.KeyFile()
|
||||
certDomain := cfg.CertDomain()
|
||||
certCache := cfg.CertCache()
|
||||
server := &http.Server{
|
||||
ReadTimeout: 5 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
IdleTimeout: 60 * time.Second,
|
||||
Addr: cfg.Get("LISTEN_ADDR", config.DefaultListenAddr),
|
||||
Addr: cfg.ListenAddr(),
|
||||
Handler: routes(cfg, store, feedHandler, pool),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue