fixed cookies parameters for locale

This commit is contained in:
Anatoly 2019-08-20 11:57:12 +03:00
parent 09ad324b43
commit 6901978cf1

View File

@ -11,6 +11,9 @@ from rest_framework import status
class JWTGenericViewMixin(generics.GenericAPIView):
"""JWT view mixin"""
LOCALE_HTTP_ONLY = False
LOCALE_SECURE = False
ACCESS_TOKEN_HTTP_ONLY = False
ACCESS_TOKEN_SECURE = False
@ -42,8 +45,8 @@ class JWTGenericViewMixin(generics.GenericAPIView):
# Create locale namedtuple
_locale = self.COOKIE(key='locale',
value=locale,
http_only=True,
secure=False)
http_only=self.LOCALE_HTTP_ONLY,
secure=self.LOCALE_SECURE)
# Write to cookie access and refresh token with secure flag
if access_token and refresh_token: