Reduce unified login cookie size

By dropping some of the less likely-to-be-used items.
This commit is contained in:
Conrad Hoffmann 2023-09-20 22:34:41 +02:00 committed by Drew DeVault
parent cee1b399c4
commit 9d194be927
1 changed files with 1 additions and 0 deletions

View File

@ -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(),