2018-07-09 23:22:26 +02:00
|
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
|
|
from django.conf.urls import url
|
2016-05-29 08:29:14 +02:00
|
|
|
|
2018-08-22 07:59:22 +02:00
|
|
|
from openslides.utils.consumers import SiteConsumer
|
2018-07-09 23:22:26 +02:00
|
|
|
from openslides.utils.middleware import AuthMiddlewareStack
|
2016-09-17 22:26:23 +02:00
|
|
|
|
|
|
|
|
2018-07-09 23:22:26 +02:00
|
|
|
application = ProtocolTypeRouter({
|
|
|
|
# WebSocket chat handler
|
|
|
|
"websocket": AuthMiddlewareStack(
|
|
|
|
URLRouter([
|
2018-11-04 17:13:24 +01:00
|
|
|
url(r"^ws/$", SiteConsumer),
|
2018-07-09 23:22:26 +02:00
|
|
|
])
|
|
|
|
)
|
|
|
|
})
|