This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/authentik/root/websocket.py
Jens Langhammer e9e0992dce root: add middleware to properly report websocket connection to sentry
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-27 16:21:44 +02:00

15 lines
488 B
Python

"""root Websocket URLS"""
from channels.auth import AuthMiddlewareStack
from django.urls import path
from authentik.lib.sentry import SentryWSMiddleware
from authentik.outposts.channels import OutpostConsumer
from authentik.root.messages.consumer import MessageConsumer
websocket_urlpatterns = [
path("ws/outpost/<uuid:pk>/", SentryWSMiddleware(OutpostConsumer.as_asgi())),
path(
"ws/client/", AuthMiddlewareStack(SentryWSMiddleware(MessageConsumer.as_asgi()))
),
]