diff --git a/booth/views.py b/booth/views.py index a469480..04735cd 100644 --- a/booth/views.py +++ b/booth/views.py @@ -118,7 +118,7 @@ def likes(self, request, pk=None): booth_like = BoothLike.objects.create(booth=booth, key=key, fingerprint=fingerprint) serializer = LikeSerializer(booth_like) response = Response(serializer.data) - response.set_cookie(booth_id, key, max_age=5*24*60*60, httponly=True) + response.set_cookie(booth_id, key, max_age=5*24*60*60, httponly=True, secure=True, samesite=None) return response elif request.method == 'DELETE': diff --git a/festival/settings.py b/festival/settings.py index e485900..8a4b210 100644 --- a/festival/settings.py +++ b/festival/settings.py @@ -198,4 +198,12 @@ 'comments' : '60/minute', 'likes': '100/minute', } -} \ No newline at end of file +} + +# CSRF 쿠키 설정 +CSRF_COOKIE_SECURE = True +CSRF_COOKIE_SAMESITE = 'None' + +# 세션 쿠키 설정 +SESSION_COOKIE_SECURE = True +SESSION_COOKIE_SAMESITE = 'None' \ No newline at end of file