From 9908e5795b09168b9283a9b74a687402a93f4316 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Sat, 21 Jul 2018 17:16:36 +0300 Subject: [PATCH] change session name for multiple shops --- shop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shop.py b/shop.py index e50e7a2..ee210a1 100644 --- a/shop.py +++ b/shop.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # all the imports -import sqlite3, time, datetime, hashlib, os,re +import sqlite3, time, datetime, hashlib, os, re from shutil import copyfile, move from flask import Flask, request, session, g, redirect, url_for, \ abort, render_template, flash @@ -21,6 +21,7 @@ CODEFINDER = re.compile(r'\`([^\`]+)\`') # create our little application :) app = Flask(__name__) app.config.from_object(__name__) +app.config['SESSION_COOKIE_NAME'] = os.getenv('SESSION_COOKIE_NAME', 'mdshop') app.wsgi_app = ReverseProxied(app.wsgi_app) def connect_db():