kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix cookies not being set on new frontend deployment
rodzic
1e30620e92
commit
57ca334887
|
@ -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 = [
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Ładowanie…
Reference in New Issue