diff --git a/ref-test/common/blueprints.py b/ref-test/common/blueprints.py index 4500c2a..39f0e9c 100644 --- a/ref-test/common/blueprints.py +++ b/ref-test/common/blueprints.py @@ -7,14 +7,15 @@ cookie_consent = Blueprint( ) @cookie_consent.route('/') def _cookies(): + from main import app resp = redirect('/') resp.set_cookie( key = 'cookie_consent', value = 'True', - max_age = timedelta(days=14) if request.cookies.get('remember') == 'True' else 'Session', + max_age = timedelta(days=14) if request.cookies.get('remember') == 'True' else None, path = '/', - expires = datetime.utcnow() + timedelta(days=14) if request.cookies.get('remember') else 'Session', - domain = '.reftest.vsnt.uk', + expires = datetime.utcnow() + timedelta(days=14) if request.cookies.get('remember') else None, + domain = f'.{app.config["SERVER_NAME"]}', secure = True ) return resp \ No newline at end of file