OpenSlides/openslides/routing.py

14 lines
371 B
Python
Raw Normal View History

from channels.routing import ProtocolTypeRouter, URLRouter
from django.conf.urls import url
2018-08-22 07:59:22 +02:00
from openslides.utils.consumers import SiteConsumer
from openslides.utils.middleware import AuthMiddlewareStack
2019-01-06 16:22:33 +01:00
application = ProtocolTypeRouter(
{
# WebSocket chat handler
"websocket": AuthMiddlewareStack(URLRouter([url(r"^ws/$", SiteConsumer)]))
}
)