From 6901978cf124d1cd5967bd63b574f07fcdba2e9f Mon Sep 17 00:00:00 2001 From: Anatoly Date: Tue, 20 Aug 2019 11:57:12 +0300 Subject: [PATCH] fixed cookies parameters for locale --- apps/utils/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/utils/views.py b/apps/utils/views.py index 2040d55a..2f435e1d 100644 --- a/apps/utils/views.py +++ b/apps/utils/views.py @@ -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: