From f160092b2a2c2674a07239a70794ac187a9290ee Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Sat, 3 Aug 2024 18:45:50 +0200 Subject: [PATCH] =?UTF-8?q?=C3=96kat=20p=C3=A5=20storleken=20p=C3=A5=20ses?= =?UTF-8?q?sionskakan=20f=C3=B6r=20att=20se=20om=20det=20tar=20bort=20varn?= =?UTF-8?q?ingen=20om=20att=20den=20=C3=A4r=20st=C3=B6rre=20=C3=A4n=204096?= =?UTF-8?q?=20byte.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smartassist/src/backend.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smartassist/src/backend.py b/smartassist/src/backend.py index de7deb9..b746d34 100644 --- a/smartassist/src/backend.py +++ b/smartassist/src/backend.py @@ -22,6 +22,10 @@ logger.debug("Current working directory: %s", os.getcwd()) app = Flask(__name__) app.config['STATIC_FOLDER'] = 'static' # Adjust if needed +# Increase the maximum cookie size +app.config['SESSION_COOKIE_SAMESITE'] = 'Lax' +app.config['SESSION_COOKIE_SIZE_LIMIT'] = 4096 * 2 # Allow up to 8KB cookies + # Set the secret key for session management secret_key = os.urandom(24) app.config['SECRET_KEY'] = secret_key # When do I need this. How is it retained between sessions?