diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-02-03 15:33:17 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-02-03 15:33:17 -0800 |
commit | 9c4299720900fce52daedfce2314d31e92f7fe1d (patch) | |
tree | 2a67a75d71011d071910a4cb4216d45ee9d904c4 /ui | |
parent | 78385a351e208feb183549c2fa854b302da0c690 (diff) |
Add support for base URLs with subfolders
Diffstat (limited to 'ui')
-rw-r--r-- | ui/login.go | 4 | ||||
-rw-r--r-- | ui/oauth2.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/login.go b/ui/login.go index f44e181..fc10bc3 100644 --- a/ui/login.go +++ b/ui/login.go @@ -59,7 +59,7 @@ func (c *Controller) CheckLogin(ctx *handler.Context, request *handler.Request, logger.Info("[Controller:CheckLogin] username=%s just logged in", authForm.Username) - response.SetCookie(cookie.New(cookie.CookieUserSessionID, sessionToken, c.cfg.IsHTTPS)) + response.SetCookie(cookie.New(cookie.CookieUserSessionID, sessionToken, c.cfg.IsHTTPS, c.cfg.BasePath())) response.Redirect(ctx.Route("unread")) } @@ -75,6 +75,6 @@ func (c *Controller) Logout(ctx *handler.Context, request *handler.Request, resp logger.Error("[Controller:Logout] %v", err) } - response.SetCookie(cookie.Expired(cookie.CookieUserSessionID, c.cfg.IsHTTPS)) + response.SetCookie(cookie.Expired(cookie.CookieUserSessionID, c.cfg.IsHTTPS, c.cfg.BasePath())) response.Redirect(ctx.Route("login")) } diff --git a/ui/oauth2.go b/ui/oauth2.go index 4afc7d8..c5bf931 100644 --- a/ui/oauth2.go +++ b/ui/oauth2.go @@ -132,7 +132,7 @@ func (c *Controller) OAuth2Callback(ctx *handler.Context, request *handler.Reque logger.Info("[Controller:OAuth2Callback] username=%s just logged in", user.Username) - response.SetCookie(cookie.New(cookie.CookieUserSessionID, sessionToken, c.cfg.IsHTTPS)) + response.SetCookie(cookie.New(cookie.CookieUserSessionID, sessionToken, c.cfg.IsHTTPS, c.cfg.BasePath())) response.Redirect(ctx.Route("unread")) } |