i have an issue with session on flask, in authentication page, i’m able to login but it doesn’t redirect to the index page. The problem is the session doesn’t store the username. So when i’m redirected to the index page the code check for the username in the session and it do not find it… […]
Categories
Flask session don’t work with nginx and gunicorn
- Post author By Full Stack
- Post date December 17, 2020
- No Comments on Flask session don’t work with nginx and gunicorn
- Tags flash, i have an issue with session on flask, i'm able to login but it doesn't redirect to the index page. The problem is the session doesn't store the username. So when i'm redirected to, in authentication page, json, make_response @urls.route("/") def home(): if session.get("username") is None: return redirect(url_for('urls.auth')) elif se, redirect, render_template, request, session, url_for, welcome home ' + session['username']) return redirect(url_for('urls.index')) and i run gunicorn with the following command: gunicorn3