mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Store language in session to show the login page translated
This commit is contained in:
parent
6302c3b219
commit
bdcc4134fa
7 changed files with 30 additions and 9 deletions
|
@ -50,7 +50,15 @@ func (s *UserSessionMiddleware) Handler(next http.Handler) http.Handler {
|
|||
func (s *UserSessionMiddleware) isPublicRoute(r *http.Request) bool {
|
||||
route := mux.CurrentRoute(r)
|
||||
switch route.GetName() {
|
||||
case "login", "checkLogin", "stylesheet", "javascript", "oauth2Redirect", "oauth2Callback", "appIcon", "favicon", "webManifest":
|
||||
case "login",
|
||||
"checkLogin",
|
||||
"stylesheet",
|
||||
"javascript",
|
||||
"oauth2Redirect",
|
||||
"oauth2Callback",
|
||||
"appIcon",
|
||||
"favicon",
|
||||
"webManifest":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue