# HG changeset patch # User bsw # Date 1603209873 -7200 # Node ID 8f354722d75428e970ba4665e658a2521393989f # Parent 1eaea27130bcbe74deb1ed3ef86725006b175306 Create empty session if no session available diff -r 1eaea27130bc -r 8f354722d754 app/main/_filter/20_session.lua --- a/app/main/_filter/20_session.lua Tue Oct 20 18:02:38 2020 +0200 +++ b/app/main/_filter/20_session.lua Tue Oct 20 18:04:33 2020 +0200 @@ -48,9 +48,11 @@ app.session = Session:by_ident(cookie) end - if not cors_request and not app.session then + if not app.session then app.session = Session:new() - app.session:set_cookie() + if not cors_request then + app.session:set_cookie() + end end end