change how config is loaded

This commit is contained in:
2019-12-30 13:00:00 +01:00
parent 7b5723705c
commit efd9f716eb
9 changed files with 71 additions and 49 deletions

View File

@@ -16,7 +16,7 @@ func (wc *WebController) serveLogout(
p httprouter.Params,
) {
if key, err := wc.getAPIKey(r); err == nil {
var api = pixelapi.New(wc.conf.APIURLInternal, key)
var api = pixelapi.New(wc.apiURLInternal, key)
if err = api.UserSessionDestroy(key); err != nil {
log.Warn("logout failed for session '%s': %s", key, err)
}
@@ -177,7 +177,7 @@ func (wc *WebController) loginForm(td *TemplateData, r *http.Request) (f Form) {
Value: loginResp.APIKey,
Path: "/",
Expires: time.Now().AddDate(50, 0, 0),
Domain: wc.conf.SessionCookieDomain,
Domain: wc.sessionCookieDomain,
}
f.Extra.RedirectTo = "/user"
}