# HG changeset patch # User bsw # Date 1603209926 -7200 # Node ID 3fac5fd201fe1952e5a027f91845cc4b6801bf21 # Parent 8f354722d75428e970ba4665e658a2521393989f Create empty session in all cases diff -r 8f354722d754 -r 3fac5fd201fe app/main/_filter/20_session.lua --- a/app/main/_filter/20_session.lua Tue Oct 20 18:04:33 2020 +0200 +++ b/app/main/_filter/20_session.lua Tue Oct 20 18:05:26 2020 +0200 @@ -47,14 +47,13 @@ if cookie then app.session = Session:by_ident(cookie) end +end - if not app.session then - app.session = Session:new() - if not cors_request then - app.session:set_cookie() - end +if not app.session then + app.session = Session:new() + if not cors_request then + app.session:set_cookie() end - end locale.set{ lang = app.session and app.session.lang or config.default_lang or "en" }