flows: add ensure_csrf_cookie() to flow shell view

This commit is contained in:
Jens Langhammer 2021-02-22 18:42:15 +01:00
parent 35ac87ec10
commit 5904070bb2
1 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,12 @@
"""flow urls"""
from django.urls import path
from django.views.decorators.csrf import ensure_csrf_cookie
from authentik.flows.models import FlowDesignation
from authentik.flows.views import (
CancelView,
ConfigureFlowInitView,
FlowExecutorShellView,
FlowExecutorView,
ToDefaultFlow,
)
@ -42,8 +42,9 @@ urlpatterns = [
ConfigureFlowInitView.as_view(),
name="configure",
),
path("b/<slug:flow_slug>/", FlowExecutorView.as_view(), name="flow-executor"),
path(
"<slug:flow_slug>/", FlowExecutorShellView.as_view(), name="flow-executor-shell"
"<slug:flow_slug>/",
ensure_csrf_cookie(FlowExecutorShellView.as_view()),
name="flow-executor-shell",
),
]