Cookie bugfix, removed 'session' string from expiry/age
This commit is contained in:
parent
6be20568a8
commit
70671adac8
@ -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
|
Loading…
Reference in New Issue
Block a user