Skip to content

Commit

Permalink
pagination_alive
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonju977 committed Oct 8, 2024
1 parent f8ccbd6 commit 6af8bbb
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions api/users/utils.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import os
from dataclasses import dataclass, field
from pathlib import Path

import pytz
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import timezone

# from dotenv import load_dotenv
from dotenv import load_dotenv
from rest_framework.permissions import BasePermission
from rest_framework_simplejwt.tokens import RefreshToken

# from pathlib import Path


# BASE_DIR = Path(__file__).resolve().parent.parent
BASE_DIR = Path(__file__).resolve().parent.parent


@dataclass
Expand Down Expand Up @@ -112,9 +109,10 @@ def set_cookie_attributes(response, key, token):
key=key,
value=token,
httponly=True,
samesite="Lax",
secure=False,
samesite="None",
secure=True,
expires=expires_at,
domain=os.getenv("COOKIE_DOMAIN"),
path="/",
)

Expand Down Expand Up @@ -209,12 +207,12 @@ def set_cookie_attributes(response, key, token):
key=key,
value=token,
httponly=True,
samesite="Lax",
secure=False,
samesite="None",
secure=True,
expires=expires_at,
domain=os.getenv("COOKIE_DOMAIN"),
path="/",
)

return response

@staticmethod
Expand Down

0 comments on commit 6af8bbb

Please sign in to comment.