Skip to content Skip to sidebar Skip to footer

Flask Session Is Empty After Redirect

I have such code: from flask import Flask, render_template, redirect, request, url_for, session app = Flask(__name__) @app.route('/') def index(): tmplt = session.get('templ

Solution 1:

Looking at the sessions implementation, it seems that flask just saves all the session data into the cookie.

And the maximum cookie size, according to this answer, is 4KB. If your file is larger than that then browser can just reject the cookie.

In the any case, storing the file into the session doesn't look like a good idea.

Post a Comment for "Flask Session Is Empty After Redirect"