routing.py 554 B

12345678910111213141516
  1. # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
  2. # Copyright: (c) <spug.dev@gmail.com>
  3. # Released under the AGPL-3.0 License.
  4. from django.urls import path
  5. from channels.routing import URLRouter
  6. from consumer.middleware import AuthMiddleware
  7. from consumer.consumers import *
  8. ws_router = AuthMiddleware(
  9. URLRouter([
  10. path('ws/exec/<str:token>/', ExecConsumer),
  11. path('ws/ssh/<int:id>/', SSHConsumer),
  12. path('ws/<str:module>/<str:token>/', ComConsumer),
  13. path('ws/notify/', NotifyConsumer),
  14. ])
  15. )