Fix cookies not being set on new frontend deployment

funkwhale-fix_pwa_manifest
wvffle 2022-12-13 13:58:11 +00:00
rodzic 1e30620e92
commit 57ca334887
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -1173,7 +1173,7 @@ Examples:
- ``^api/mycustompath/``
"""
CSRF_USE_SESSIONS = True
CSRF_USE_SESSIONS = False
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
ACCOUNT_USERNAME_BLACKLIST = [

Wyświetl plik

@ -4,6 +4,8 @@ import logging
from cache_memoize import cache_memoize
from django.conf import settings
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import ensure_csrf_cookie
from drf_spectacular.utils import extend_schema
from dynamic_preferences.api import viewsets as preferences_viewsets
from dynamic_preferences.api.serializers import GlobalPreferenceSerializer
@ -55,6 +57,7 @@ class InstanceSettings(generics.GenericAPIView):
return Response(data, status=200)
@method_decorator(ensure_csrf_cookie, name="dispatch")
class NodeInfo(views.APIView):
permission_classes = []
authentication_classes = []