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
|
|
|
|
2019-10-15 10:54:31 +02:00
|
|
|
from openslides.utils.consumers import CloseConsumer, SiteConsumer
|
2018-07-09 23:22:26 +02:00
|
|
|
from openslides.utils.middleware import AuthMiddlewareStack
|
2016-09-17 22:26:23 +02:00
|
|
|
|
|
|
|
|
2019-01-06 16:22:33 +01:00
|
|
|
application = ProtocolTypeRouter(
|
|
|
|
{
|
|
|
|
# WebSocket chat handler
|
2019-10-15 10:54:31 +02:00
|
|
|
"websocket": AuthMiddlewareStack(
|
|
|
|
URLRouter([url(r"^ws/$", SiteConsumer), url(".*", CloseConsumer)])
|
|
|
|
)
|
2019-01-06 16:22:33 +01:00
|
|
|
}
|
|
|
|
)
|