mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Fix: ensure CSRF-Token on Index view (#5082)
This commit is contained in:
parent
945fb675e9
commit
74e89b0ee3
1 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ from django.urls import path
|
|||
from django.urls import re_path
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from django.views.generic import RedirectView
|
||||
from rest_framework.authtoken import views
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
|
@ -178,7 +179,11 @@ urlpatterns = [
|
|||
# login, logout
|
||||
path("accounts/", include("django.contrib.auth.urls")),
|
||||
# Root of the Frontend
|
||||
re_path(r".*", login_required(IndexView.as_view()), name="base"),
|
||||
re_path(
|
||||
r".*",
|
||||
login_required(ensure_csrf_cookie(IndexView.as_view())),
|
||||
name="base",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue