mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
17 lines
471 B
Python
17 lines
471 B
Python
import django
|
|
import os
|
|
from django.core.asgi import get_asgi_application
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
import dispatcharr.routing
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dispatcharr.settings")
|
|
django.setup()
|
|
|
|
from .jwt_ws_auth import JWTAuthMiddleware
|
|
|
|
application = ProtocolTypeRouter({
|
|
"http": get_asgi_application(),
|
|
"websocket": JWTAuthMiddleware(
|
|
URLRouter(dispatcharr.routing.websocket_urlpatterns)
|
|
),
|
|
})
|