mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 00:06:07 -07:00
Patch SameSite support into cookies
* Python 2.7 is missing SameSite cookie attribute
This commit is contained in:
parent
07d7170e49
commit
1c395ab10c
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,13 @@ else:
|
|||
from plexpy.users import Users, refresh_users
|
||||
from plexpy.plextv import PlexTV
|
||||
|
||||
# Monkey patch SameSite support into cookies.
|
||||
# https://stackoverflow.com/a/50813092
|
||||
try:
|
||||
from http.cookies import Morsel
|
||||
except ImportError:
|
||||
from Cookie import Morsel
|
||||
Morsel._reserved[str('samesite')] = str('SameSite')
|
||||
|
||||
JWT_ALGORITHM = 'HS256'
|
||||
JWT_COOKIE_NAME = 'tautulli_token_'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue