from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from channels.sessions import SessionMiddlewareStack
from channels.security.websocket import AllowedHostsOriginValidator
from echo import routing as echo_routing

application = ProtocolTypeRouter({
	'websocket': 
		AllowedHostsOriginValidator(
			SessionMiddlewareStack(
				AuthMiddlewareStack(
					URLRouter(
						echo_routing.websocket_urlpatterns
					)
				)
			)
		) 
})
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from channels.sessions import SessionMiddlewareStack
from channels.security.websocket import AllowedHostsOriginValidator
from echo import routing as echo_routing

application = ProtocolTypeRouter({
	'websocket': 
		AllowedHostsOriginValidator(
			SessionMiddlewareStack(
				AuthMiddlewareStack(
					URLRouter(
						echo_routing.websocket_urlpatterns
					)
				)
			)
		) 
})