mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-28 18:23:44 +03:00
17 lines
453 B
Python
17 lines
453 B
Python
|
import os
|
||
|
|
||
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
||
|
from django.core.asgi import get_asgi_application
|
||
|
|
||
|
from akarpov.common.channels import HeaderAuthMiddleware
|
||
|
from config import routing
|
||
|
|
||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
|
||
|
|
||
|
application = ProtocolTypeRouter(
|
||
|
{
|
||
|
"http": get_asgi_application(),
|
||
|
"websocket": HeaderAuthMiddleware(URLRouter(routing.websocket_urlpatterns)),
|
||
|
}
|
||
|
)
|