1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Refactor config package

- Parse configuration only once during startup time
- Store configuration values in a global variable
This commit is contained in:
Frédéric Guillot 2019-06-01 18:18:09 -07:00 committed by fguillot
parent 04d85b3c63
commit 228862fefa
28 changed files with 922 additions and 624 deletions

View file

@ -7,6 +7,7 @@ package ui // import "miniflux.app/ui"
import (
"net/http"
"miniflux.app/config"
"miniflux.app/http/cookie"
"miniflux.app/http/request"
"miniflux.app/http/response/html"
@ -32,8 +33,8 @@ func (h *handler) logout(w http.ResponseWriter, r *http.Request) {
http.SetCookie(w, cookie.Expired(
cookie.CookieUserSessionID,
h.cfg.IsHTTPS,
h.cfg.BasePath(),
config.Opts.HTTPS,
config.Opts.BasePath(),
))
html.Redirect(w, r, route.Path(h.router, "login"))