Reduce unified login cookie size
By dropping some of the less likely-to-be-used items.
This commit is contained in:
parent
cee1b399c4
commit
9d194be927
|
@ -445,6 +445,7 @@ class SrhtFlask(Flask):
|
|||
else:
|
||||
# Set user info cookie
|
||||
user_info = g.current_user.to_dict(first_party=True)
|
||||
user_info = {k:v for k,v in user_info.items() if k not in ['bio', 'location', 'url']}
|
||||
user_info = json.dumps(user_info)
|
||||
response.set_cookie(cookie_key,
|
||||
fernet.encrypt(user_info.encode()).decode(),
|
||||
|
|
Loading…
Reference in New Issue